b34945c2d2
Deletes CyclePhaseSystem, GoalReachedSystem, CoreDamage/CoreRestore, ThreatDirector, CoreIntegrity/GoalProgress/RunPhase/RunOutcome/ThreatState components, CoreVisualFeedbackSystem, and the whole Client/Onboarding slice (+6 test files). Keepers reworked: RunDirectorSystem (UpdateBefore attr + launch guard + goal/threat bank removed; sole SaveRequest raiser now), CycleDirectorSpawnSystem (ledger/meta host only), WaveSystem UNGATED (waves run wherever a WaveDirector is baked), EnemyAISystem core-fallback stripped, AmbientAudioSystem reworked (bed + run cues; no CycleState gate), MusicSystem RunInfo-only, HudSystem big trim (goal meter, core bar, siege banner, terminal banner, outcome flash, onboarding hook all gone), MetaShop/ClassPrep/AimReticle siege gates dropped, DebugOverlay/ops re-meant (SpawnWave=force next wave, EndSiege=quiet arena; SetCalm/AdvanceGoal/SetHeat retired, bytes reserved), TuningConfig Core knobs retired (ids 20-23 reserved), StorageMath.DrainFraction deleted, HowToPlay copy rewritten. Save epoch v7 (fresh epoch, operator-approved): SaveData drops goal/core/outcome + conveyor/machine-IO fields; MinLoadableVersion=7; PendingSave/PendingStructure trimmed; RollTerminalCampaignForward deleted; SaveStructureScan signature slimmed. 390 tests green; Play world-creation clean (player + waves live, no exceptions). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
71 lines
3.4 KiB
C#
71 lines
3.4 KiB
C#
using Unity.NetCode;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// One-shot dev-tools command from a client to the server (the DebugOverlay / execute_code). A scalar-only
|
|
/// <see cref="IRpcCommand"/> (byte opcode + two ints, the project's scalar-RPC convention) so a single wire
|
|
/// type covers every dev action via <see cref="DebugOp"/>. **Unconditional (no #if)** — the reflection-built
|
|
/// RpcCollection hash must match across release/dev peers, so only the SEND/RECEIVE systems + overlay are
|
|
/// #if-gated, never this type. The server applies it authoritatively in DebugCommandReceiveSystem, so the dev
|
|
/// buttons exercise the real paths and work over a live connection too.
|
|
/// </summary>
|
|
public struct DebugCommandRequest : IRpcCommand
|
|
{
|
|
/// <summary>Which action to perform (see <see cref="DebugOp"/>).</summary>
|
|
public byte Op;
|
|
|
|
/// <summary>First scalar argument (size / item id / region id / amount — per-op).</summary>
|
|
public int ArgA;
|
|
|
|
/// <summary>Second scalar argument (count — per-op).</summary>
|
|
public int ArgB;
|
|
}
|
|
|
|
/// <summary>Opcodes for <see cref="DebugCommandRequest.Op"/> (bytes — never an enum on the wire).</summary>
|
|
public static class DebugOp
|
|
{
|
|
/// <summary>Force the NEXT wave to start this tick (re-meant from the old arm-a-siege op; args unused).</summary>
|
|
public const byte SpawnWave = 0;
|
|
|
|
/// <summary>Quiet the arena: cull Husks + push the next wave ~1 h out (re-meant from the old end-siege op).</summary>
|
|
public const byte EndSiege = 1;
|
|
|
|
/// <summary>Cull every living Husk now (leaves wave state alone).</summary>
|
|
public const byte ClearEnemies = 2;
|
|
|
|
// RETIRED (LANTERN purge — keep the byte values reserved, never renumber a wire byte):
|
|
// 3 = SetCalm · 10 = AdvanceGoal · 11 = SetHeat
|
|
|
|
/// <summary>Deposit ArgB of resource ArgA (a <see cref="ResourceId"/>) into the shared ledger.</summary>
|
|
public const byte GrantResource = 4;
|
|
|
|
/// <summary>Grow the sender's damage upgrade by one tier (a debug StatModifier).</summary>
|
|
public const byte GrantUpgrade = 5;
|
|
|
|
/// <summary>Teleport the sender to region ArgA (a <see cref="RegionId"/>).</summary>
|
|
public const byte Teleport = 6;
|
|
|
|
/// <summary>Toggle the sender's <see cref="DebugGodMode"/> (damage immunity).</summary>
|
|
public const byte ToggleGod = 7;
|
|
|
|
/// <summary>Heal the sender to full.</summary>
|
|
public const byte Heal = 8;
|
|
|
|
/// <summary>Kill the sender (Health -> 0; the normal death/respawn loop takes over).</summary>
|
|
public const byte KillPlayer = 9;
|
|
|
|
|
|
/// <summary>Set the <see cref="TuningKnob"/> ArgA to ArgB/1000f (live dash/Charger feel-tuning; MC-0).</summary>
|
|
public const byte SetTuning = 12;
|
|
|
|
/// <summary>Swap the sender's class to ArgA (a <see cref="CharacterId"/> byte: Warrior=2 / Ranger=3).
|
|
/// Strips the old class trait seeds, re-seeds the new ones, swaps the Fire ability, and heals a living
|
|
/// player to the new class's max. Editor-only dev tool (class-switch); 0 / unknown -> Warrior.</summary>
|
|
public const byte SetClass = 13;
|
|
|
|
/// <summary>GYM (editor): spawn <see cref="GymEnemyKind"/> ArgA near the sender, ArgB times (default 1). Reads the baked GymEnemyRoster.</summary>
|
|
public const byte SpawnEnemy = 14;
|
|
}
|
|
}
|