LANTERN purge: delete the superseded base/expedition shell (audit H1/H3/M5)

The 2026-08-06 audit found the shipping scene was still the abandoned
co-op-Hades game with LANTERN combat bolted on, and that a third of the
codebase was live code for a direction abandoned on 2026-07-13. Operator
chose deletion over freezing: "everything is saved in source control if
needed. I want the project to be clean."

DELETED (~140 source files, Scripts 335->231, Tests 77->43):
- Enemy variants + boss (H3). ChargerAuthoring / SpitterAuthoring /
  SwarmerAuthoring were attached to ZERO prefabs, so LungeState /
  SpitterState / SwarmerTag were never baked: ~272 lines of Bursted AI
  passes, BossAISystem (261 lines) and the whole MixBands escalation
  curve could not match a single chunk at runtime, while 734 lines of
  green tests certified them. Both shipping enemy prefabs were already
  byte-identical in stats.
- Run/room lifecycle: RunDirector FSM, RunInfo/RunMap/RoomPlan/RoomTag,
  route select, portal interact, ready-check, room field/teardown.
- Meta shop, prep loadout, boons (incl. KillRewardSystem and
  DashTrailDamageSystem, which existed only to serve boon flags).
- Build palette + structures, shared storage, inventory/equipment
  (already recorded PAUSED in CLAUDE.md).
- The HUD panels driving all of the above (HudSystem 1168 -> 610).

KEPT deliberately: BaseGridMath + BaseAnchor (8 systems use PlotCenter
for spawn rings, respawn and dynamic light), the resource ledger +
StorageMath, the save system, region/relevancy. Three of these were in
the delete set until I checked their consumers — worth remembering that
the file-level manifest was wrong about them.

Also folds in audit finding M5: PlayerClass was a second, server-only
copy of the byte FrameId already replicates. It existed for the meta
shop; with that gone, FrameId is the single frame identity.

Harvest is now single-sink (ledger). HarvestMath keeps its shape so
LANTERN's carried-vs-banked cargo split lands in one place, not two.

295/295 EditMode green, zero compile errors. Subscene re-bake and Play
validation follow in the next commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-07 12:59:39 -07:00
parent 6a412fe3e7
commit 62e48a3b0b
304 changed files with 260 additions and 14591 deletions
@@ -20,7 +20,6 @@ namespace ProjectM.Server
[WorldSystemFilter(WorldSystemFilterFlags.ServerSimulation)]
public partial struct GoInGameServerSystem : ISystem
{
bool _warnedMetaBlocked; // one-shot: a mis-authored subscene must not silently block spawns forever
[BurstCompile]
public void OnCreate(ref SystemState state)
@@ -44,18 +43,9 @@ namespace ProjectM.Server
// block spawns forever. GymTag switches to the clean gym path (no meta seeding; a default Spark socket
// loadout below instead). The class seeds still apply (harmless: AbilityFireSystem reads sockets).
bool isGym = SystemAPI.HasSingleton<GymTag>();
MetaUpgradeCatalog metaCatalog = default;
DynamicBuffer<MetaTierState> metaRecord = default;
if (!isGym && (!SystemAPI.TryGetSingleton<MetaUpgradeCatalog>(out metaCatalog) || !metaCatalog.Value.IsCreated
|| !SystemAPI.TryGetSingletonBuffer<MetaTierState>(out metaRecord, true)))
{
if (!_warnedMetaBlocked)
{
UnityEngine.Debug.LogWarning("GoInGameServerSystem: player spawn waiting on the meta catalog/director (a mis-authored subscene would block spawns forever).");
_warnedMetaBlocked = true;
}
return;
}
// 2026-08-07 audit purge: spawning used to block until the MetaUpgradeCatalog + MetaTierState buffer
// were present (the audit's M12 — a missing catalog stranded the GoInGame RPC and no player ever
// spawned). Both are deleted, so that whole gate and its one-shot warning are gone with them.
var spawner = SystemAPI.GetSingleton<PlayerSpawner>();
@@ -87,7 +77,9 @@ namespace ProjectM.Server
ClassTraits.AppendSeeds(classId, player, ecb);
// Expedition redesign: the server-only class anchor the meta systems key on (born-correct meta
// seeding at Step 12a + per-class spend at Step 13 resolve the tier record through this).
ecb.AddComponent(player, new PlayerClass { ClassId = classId });
// 2026-08-07 audit purge: PlayerClass was a second, server-only copy of the same byte FrameId
// already replicates (audit finding M5). It existed so the meta shop could key on it; the meta
// shop is gone, so FrameId is now the single frame identity.
ecb.AddComponent(player, new FrameId { Value = classId }); // Add (not Set): baked on the real player; absent on the minimal test prefab // replicated frame/class signal
// Per-frame default Spark loadout on keys 1-4 (UNCONDITIONAL since the legacy path died — without
// this a non-gym spawn would have four empty sockets and no abilities at all).
@@ -97,32 +89,9 @@ namespace ProjectM.Server
sockets.Add(new AbilitySocket { SparkId = f1 });
sockets.Add(new AbilitySocket { SparkId = f2 });
sockets.Add(new AbilitySocket { SparkId = f3 });
// Step 12a: born-correct PERMANENT meta seeding replay this class's persisted tiers as
// meta-band StatModifiers on the just-instantiated player (same ECB as Instantiate, the
// ClassTraits idiom). Skip tier 0 / unknown ids (preserve-don't-crash); CLAMP a saved tier above a
// rebalanced MaxTier (D-F5). Class gate via BoonMath.MaskFor (ClassId is the normalized
// FrameKind 2/3 — a raw 1<<ClassId would compute bits 2/3 and silently skip everything).
if (!isGym)
{
ref var metaPool = ref metaCatalog.Value.Value;
byte classBit = BoonMath.MaskFor(classId);
for (int m = 0; m < metaRecord.Length; m++)
{
if (metaRecord[m].ClassId != classId || metaRecord[m].Tier == 0) continue;
int defIdx = MetaMath.FindDef(ref metaPool, metaRecord[m].UpgradeId);
if (defIdx < 0) continue; // unknown id (catalog drift) — preserved on disk, skipped live
if ((metaPool.Defs[defIdx].ClassMask & classBit) == 0) continue;
byte tier = metaRecord[m].Tier < metaPool.Defs[defIdx].MaxTier
? metaRecord[m].Tier : metaPool.Defs[defIdx].MaxTier;
ecb.AppendToBuffer(player, new StatModifier
{
Target = metaPool.Defs[defIdx].Target,
Op = metaPool.Defs[defIdx].Op,
Value = metaPool.Defs[defIdx].ValuePerTier * tier,
SourceId = Tuning.MetaSourceIdBase + metaRecord[m].UpgradeId,
});
}
}
// 2026-08-07 audit purge: born-correct PERMANENT meta seeding replayed each frame's persisted
// upgrade tiers as meta-band StatModifiers. The meta shop is deleted, so a spawn now carries only
// the frame's own stat band (ClassTraits.AppendSeeds above).
// Auto-despawn the player when its owning connection is removed.
ecb.AppendToBuffer(connection, new LinkedEntityGroup { Value = player });