Hygiene B2: dead-code removal

Delete (unreferenced in any scene, per operator decision):
- TrainingDummy* chain (authoring/spawner/system/components/prefab) + UpgradePickup* chain (authoring/spawner/systems/components/prefab); remove TrainingDummyTag from the 3 live combat queries (AbilityFire/Melee/HealthApplyDamage now key on EnemyTag) and repoint HealthApplyDamageSystemTests to EnemyTag.
- Dead RPC RegionTransitSystem + RegionTransitRequest (no sender, ungated) + its test.
- Heartbeat + HeartbeatSystem (no WorldSystemFilter, ran no-op every tick) + its test.
- BuildSendSystem dead conveyor/pylon dev hooks (s_ConveyorDir, [/] rotation, Place{Pylon,Harvester,Conveyor} statics).
- Deprecated CyclePhase alias consts (Expedition/Defend/Build/*Ticks); repoint WaveSystemTests to Siege/Calm.
- Unread FeelConfig fields (HitFlashDurationMs, RumbleHeavy) + dangling HudUi doc-comments + stale crefs.

451/451 EditMode tests pass. CLAUDE.md HeartbeatSystemTests example ref to be repointed in B7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-07 23:16:53 -07:00
parent b1041003f0
commit 589e712db3
53 changed files with 28 additions and 1229 deletions
@@ -80,7 +80,7 @@ namespace ProjectM.Simulation
if (isServer)
{
foreach (var (tx, th, te) in
SystemAPI.Query<RefRO<LocalTransform>, RefRO<Health>>().WithAny<TrainingDummyTag, EnemyTag>().WithEntityAccess())
SystemAPI.Query<RefRO<LocalTransform>, RefRO<Health>>().WithAll<EnemyTag>().WithEntityAccess())
{
if (th.ValueRO.Current <= 0f) continue; // B3: corpses are neither aim magnets nor cleave targets
candidatePositions.Add(tx.ValueRO.Position);
@@ -4,7 +4,7 @@ namespace ProjectM.Simulation
{
/// <summary>
/// EB-1 — opt-in marker for an entity that <see cref="ProjectM.Server.HealthApplyDamageSystem"/> DESTROYS when
/// its <see cref="Health"/> hits 0 (alongside <c>TrainingDummyTag</c>/<c>EnemyTag</c>). Baked ONLY on the
/// its <see cref="Health"/> hits 0 (alongside <c>EnemyTag</c>). Baked ONLY on the
/// player-built structure ghosts (Turret/Wall/Pylon) so "machines can die". DELIBERATELY a distinct tag rather
/// than gating on bare <see cref="PlacedStructure"/>: that identity is SHARED by the reserved M7 automation
/// machines (Harvester/Fabricator/Conveyor) whose teardown would silently drop in-flight conveyor cargo — the
@@ -7,7 +7,7 @@ namespace ProjectM.Simulation
/// Hit points for any damageable ghost (players, training dummies). Server-authoritative:
/// only server systems write <see cref="Current"/>; clients receive it via the [GhostField]
/// for display and prediction reconciliation. <see cref="Max"/> is baked identically on both
/// worlds and is not replicated. Added by PlayerBaker / TrainingDummyBaker.
/// worlds and is not replicated. Added by PlayerBaker.
/// </summary>
public struct Health : IComponentData
{
@@ -1,26 +0,0 @@
using Unity.Entities;
using Unity.Mathematics;
namespace ProjectM.Simulation
{
/// <summary>
/// Baked singleton describing the training-dummy field to spawn at world start. Consumed once by
/// the server-only TrainingDummySpawnSystem, which instantiates <see cref="Count"/> dummies from
/// <see cref="Prefab"/> and then destroys this singleton so the spawn runs exactly once. Not
/// replicated — dummies are spawned authoritatively on the server and reach clients as ghosts.
/// </summary>
public struct TrainingDummySpawner : IComponentData
{
/// <summary>Baked entity prefab to instantiate for each dummy.</summary>
public Entity Prefab;
/// <summary>Number of dummies to spawn.</summary>
public int Count;
/// <summary>World-unit gap between consecutive dummies along the spawn line (X axis).</summary>
public float Spacing;
/// <summary>World-space position of the first dummy; subsequent dummies offset by <see cref="Spacing"/>.</summary>
public float3 Origin;
}
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: a8f27601fb20640718aaed2c48d1d016
@@ -1,11 +0,0 @@
using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Zero-size marker identifying a training-dummy enemy. Server auto-target collects
/// <see cref="TrainingDummyTag"/> entities as candidates, and the damage/death path destroys
/// a dummy when its <c>Health.Current</c> reaches zero. Added by TrainingDummyBaker.
/// </summary>
public struct TrainingDummyTag : IComponentData { }
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: ebe9114e40db748669d89ef861415bac
@@ -1,17 +0,0 @@
using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// A world pickup that, on player overlap, grants one StatModifier (server-authoritative) and is then
/// destroyed. Mirrors a single StatModifier payload (Target/Op as bytes). The pickup is an
/// interpolated ghost so clients see and despawn it; the grant is applied by UpgradePickupSystem.
/// </summary>
public struct UpgradePickup : IComponentData
{
public byte Target; // StatTarget
public byte Op; // ModOp
public float Value;
public uint SourceId;
}
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: a0d34f4d0b12241c7b0f0b1d002142f3
@@ -1,17 +0,0 @@
using Unity.Entities;
using Unity.Mathematics;
namespace ProjectM.Simulation
{
/// <summary>
/// Singleton describing how many upgrade pickups to spawn and where (mirrors TrainingDummySpawner).
/// Consumed once by the server's UpgradePickupSpawnSystem.
/// </summary>
public struct UpgradePickupSpawner : IComponentData
{
public Entity Prefab;
public float3 Origin;
public int Count;
public float Spacing;
}
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 059368b62be834614ae3a110a51d42da