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:
@@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// Authoring for the boon-catalog config singleton (place ONE in the gameplay subscene). Designers can author
|
||||
/// rows in the inspector; an EMPTY list bakes the code-default v1 table (<see cref="BoonCatalogData.BuildDefault"/>)
|
||||
/// verbatim — so the subscene object needs zero property assignment through the tooling (the
|
||||
/// component_properties enum/array-drop hazard). Ids are APPEND-ONLY (they ride the replicated BoonOffer bytes
|
||||
/// and, later, per-run analytics).
|
||||
/// </summary>
|
||||
public class BoonCatalogAuthoring : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
public struct BoonRow
|
||||
{
|
||||
public byte Id;
|
||||
public StatTarget Target;
|
||||
public ModOp Op;
|
||||
public float Value;
|
||||
[Tooltip("Rarity draw weight: common 100 / rare 30 / epic 10. 0 removes the boon from the pool.")]
|
||||
public byte Weight;
|
||||
[Tooltip("bit0 = Warrior, bit1 = Ranger, 3 = both.")]
|
||||
public byte ClassMask;
|
||||
public string Name;
|
||||
public string Desc;
|
||||
}
|
||||
|
||||
[Tooltip("Leave EMPTY to bake the code-default v1 table; fill to fully replace it.")]
|
||||
public List<BoonRow> Rows = new List<BoonRow>();
|
||||
|
||||
private class BoonCatalogBaker : Baker<BoonCatalogAuthoring>
|
||||
{
|
||||
public override void Bake(BoonCatalogAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.None);
|
||||
|
||||
BlobAssetReference<BoonCatalogBlob> blob;
|
||||
if (authoring.Rows == null || authoring.Rows.Count == 0)
|
||||
{
|
||||
blob = BoonCatalogData.BuildDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
var builder = new BlobBuilder(Allocator.Temp);
|
||||
ref var root = ref builder.ConstructRoot<BoonCatalogBlob>();
|
||||
var defs = builder.Allocate(ref root.Defs, authoring.Rows.Count);
|
||||
for (int i = 0; i < authoring.Rows.Count; i++)
|
||||
{
|
||||
var r = authoring.Rows[i];
|
||||
defs[i] = new BoonDefBlob
|
||||
{
|
||||
Id = r.Id,
|
||||
Target = (byte)r.Target,
|
||||
Op = (byte)r.Op,
|
||||
Value = r.Value,
|
||||
Weight = r.Weight,
|
||||
ClassMask = r.ClassMask,
|
||||
Name = new FixedString64Bytes(r.Name ?? string.Empty),
|
||||
Desc = new FixedString128Bytes(r.Desc ?? string.Empty),
|
||||
};
|
||||
}
|
||||
blob = builder.CreateBlobAssetReference<BoonCatalogBlob>(Allocator.Persistent);
|
||||
builder.Dispose();
|
||||
}
|
||||
|
||||
AddBlobAsset(ref blob, out _);
|
||||
AddComponent(entity, new BoonCatalog { Value = blob });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 075a570afb8ef9541b6307280b53f4e7
|
||||
@@ -1,32 +0,0 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// MC-1 — marks a Husk prefab as a CHARGER variant. Compose this WITH <see cref="EnemyAuthoring"/> on the
|
||||
/// prefab root (both bakers share the primary entity): EnemyAuthoring bakes the common Husk components and
|
||||
/// Charger-tuned stats; this bakes the server-only <see cref="LungeState"/> (zeroed = not lunging).
|
||||
/// Component-PRESENCE is the discriminator <c>EnemyAISystem</c> branches on — no enum/brain byte (the Burst
|
||||
/// cross-assembly-enum hazard) — routing the Charger to the commit→lunge→whiff-stagger pass while the Grunt
|
||||
/// pass excludes it via <c>.WithNone<LungeState>()</c>. NOT a <c>[GhostField]</c>: the lunged position
|
||||
/// replicates via stock LocalTransform like every Husk.
|
||||
/// </summary>
|
||||
public class ChargerAuthoring : MonoBehaviour
|
||||
{
|
||||
private class ChargerBaker : Baker<ChargerAuthoring>
|
||||
{
|
||||
public override void Bake(ChargerAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<LungeState>(entity);
|
||||
// Slice 1 (Feature D): the replicated mid-lunge cue, baked DISABLED (a Charger spawns not-lunging).
|
||||
// EnemyAISystem derives the bit each tick from LungeState.UntilTick (visiting disabled entities via
|
||||
// .WithPresent<IsLunging>()). Adding this [GhostEnabledBit] changes the Charger ghost hash -> RE-BAKE.
|
||||
AddComponent<IsLunging>(entity);
|
||||
SetComponentEnabled<IsLunging>(entity, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9565191e0ea7fc94db934ae91a43a4cf
|
||||
@@ -60,16 +60,11 @@ namespace ProjectM.Authoring
|
||||
// denominator per variant; IsCharger lets the client pick the Charger look (LungeState is server-only).
|
||||
// Kind byte (client telegraph look) — derived from the sibling variant authoring (EnemyBaker is the
|
||||
// SOLE EnemyTelegraph writer). Grunt=0 / Charger=1 / Spitter=2 / Swarmer=3 (ZoneEnemyMath.Kind*).
|
||||
byte kind = ZoneEnemyMath.KindGrunt;
|
||||
// 2026-08-07 audit purge: the Charger/Spitter/Swarmer variant authoring is gone — it was attached
|
||||
// to ZERO prefabs, so every enemy already baked Kind=Grunt and the variant AI passes matched
|
||||
// nothing. One kind, one windup, until the LANTERN bestiary reintroduces variety via CreatureKit.
|
||||
const byte kind = ZoneEnemyMath.KindGrunt;
|
||||
byte windup = (byte)Tuning.AttackWindupTicks;
|
||||
var spitter = GetComponent<SpitterAuthoring>();
|
||||
// Bake-time guard (DR-041 sole-Position-writer invariant): a prefab must carry at most ONE of
|
||||
// {ChargerAuthoring(LungeState), SpitterAuthoring(SpitterState)} — both would match ZERO AI passes.
|
||||
if (GetComponent<ChargerAuthoring>() != null && spitter != null)
|
||||
Debug.LogError($"Enemy '{authoring.name}' has BOTH ChargerAuthoring and SpitterAuthoring; it would match no AI pass and never move. Remove one.", authoring);
|
||||
if (GetComponent<ChargerAuthoring>() != null) { kind = ZoneEnemyMath.KindCharger; windup = (byte)Tuning.ChargerWindupTicks; }
|
||||
else if (spitter != null) { kind = ZoneEnemyMath.KindSpitter; windup = (byte)Mathf.Clamp(spitter.WindupTicks, 1, 255); }
|
||||
else if (GetComponent<SwarmerAuthoring>() != null) { kind = ZoneEnemyMath.KindSwarmer; windup = (byte)Tuning.AttackWindupTicks; /* B4: match the server windup (grunt-path swarmers use GruntWindupTicks); baked 6 was a snap-ramp lie */ }
|
||||
AddComponent(entity, new EnemyTelegraph { WindupTicks = windup, Kind = kind });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// MC-2 — authoring for the hostile Spitter projectile prefab (an ownerless INTERPOLATED ghost, duplicated from an
|
||||
/// existing interpolated ghost so the GhostAuthoringComponent comes free). Bakes <see cref="EnemyProjectile"/> with
|
||||
/// the spit's default Speed/Damage/Range; the firing Spitter OVERRIDES Direction + Speed + Damage + Region at spawn
|
||||
/// and ADDS the <c>RegionTag</c> (so this prefab MUST NOT bake RegionTag — AddComponent would throw on a baked one).
|
||||
/// NO Health (so it is invisible to every player hit-test) and NO <c>[GhostField]</c> beyond the stock LocalTransform.
|
||||
/// </summary>
|
||||
public class EnemyProjectileAuthoring : MonoBehaviour
|
||||
{
|
||||
[Min(0f), Tooltip("Default muzzle speed (the firing Spitter overrides this per-variant).")]
|
||||
public float Speed = 11f;
|
||||
|
||||
[Min(0f), Tooltip("Default damage (the firing Spitter overrides this from its AttackDamage).")]
|
||||
public float Damage = 8f;
|
||||
|
||||
[Min(0f), Tooltip("Max travel distance before the spit expires (world units).")]
|
||||
public float Range = 16f;
|
||||
|
||||
private class EnemyProjectileBaker : Baker<EnemyProjectileAuthoring>
|
||||
{
|
||||
public override void Bake(EnemyProjectileAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new EnemyProjectile
|
||||
{
|
||||
Speed = authoring.Speed,
|
||||
Damage = authoring.Damage,
|
||||
Range = authoring.Range,
|
||||
Direction = new float2(0f, 1f),
|
||||
DistanceTravelled = 0f,
|
||||
LastStep = 0f,
|
||||
Region = 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff79c8fbcacb8c34faad37d59836b5ac
|
||||
@@ -1,49 +0,0 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// MC-2 — marks a Husk prefab as a SPITTER variant (the ranged "reposition" question). Compose WITH
|
||||
/// <see cref="EnemyAuthoring"/> on the prefab root: EnemyAuthoring bakes the common Husk components + the spit's
|
||||
/// damage/cooldown (EnemyStats.AttackDamage / AttackCooldownTicks), this bakes the server-only
|
||||
/// <see cref="SpitterState"/> (zeroed NextShotTick = ready). Component-PRESENCE is the discriminator EnemyAISystem
|
||||
/// branches on (no enum); the Grunt + Charger passes exclude it via <c>.WithNone<SpitterState>()</c>. The
|
||||
/// actual spit projectile is a SEPARATE ghost configured by the SpitterProjectilePrefab subscene singleton.
|
||||
/// </summary>
|
||||
public class SpitterAuthoring : MonoBehaviour
|
||||
{
|
||||
[Min(0f), Tooltip("Distance the Spitter tries to hold from its target (band centre).")]
|
||||
public float PreferredRange = 9f;
|
||||
|
||||
[Min(0f), Tooltip("Half-width dead-zone around PreferredRange where it holds and fires.")]
|
||||
public float RangeTolerance = 1.5f;
|
||||
|
||||
[Min(0f), Tooltip("Muzzle speed of the spit (world units/second). Slow enough to be dodgeable at range.")]
|
||||
public float ProjectileSpeed = 11f;
|
||||
|
||||
[Min(0f), Tooltip("If the target closes within this AND the Spitter can't retreat, it fires point-blank.")]
|
||||
public float CorneredRange = 3f;
|
||||
|
||||
[Min(1), Tooltip("Telegraph wind-up before the spit fires (ticks). Keep >= ~24 (> interp delay) to stay dodgeable.")]
|
||||
public int WindupTicks = 26;
|
||||
|
||||
private class SpitterBaker : Baker<SpitterAuthoring>
|
||||
{
|
||||
public override void Bake(SpitterAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new SpitterState
|
||||
{
|
||||
PreferredRange = authoring.PreferredRange,
|
||||
RangeTolerance = authoring.RangeTolerance,
|
||||
ProjectileSpeed = authoring.ProjectileSpeed,
|
||||
CorneredRange = authoring.CorneredRange,
|
||||
WindupTicks = authoring.WindupTicks,
|
||||
NextShotTick = 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55fe00810b31aa54abd577b6a07192e2
|
||||
@@ -1,36 +0,0 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// MC-2 — authoring for the <see cref="SpitterProjectilePrefab"/> subscene singleton. Place ONE on a GameObject in
|
||||
/// the gameplay subscene; the server EnemyAISystem Spitter pass reads it via <c>GetSingleton</c> to know which spit
|
||||
/// ghost to instantiate and the concurrent soft-cap. The referenced prefab is the EnemyProjectile ghost
|
||||
/// (EnemyProjectileAuthoring); MaxLiveProjectiles bounds the relevancy loop — a Spitter at/over the cap soft-fails
|
||||
/// its shot (no cooldown burn). The carrying entity has no transform; only the referenced prefab needs one.
|
||||
/// </summary>
|
||||
public class SpitterProjectilePrefabAuthoring : MonoBehaviour
|
||||
{
|
||||
[Tooltip("The EnemyProjectile ghost prefab that Spitters fire (must carry EnemyProjectileAuthoring + an interpolated GhostAuthoringComponent).")]
|
||||
public GameObject ProjectilePrefab;
|
||||
|
||||
[Min(1), Tooltip("Max concurrent live spit projectiles across all Spitters (soft-cap; over it a Spitter soft-fails its shot).")]
|
||||
public int MaxLiveProjectiles = 24;
|
||||
|
||||
private class SpitterProjectilePrefabBaker : Baker<SpitterProjectilePrefabAuthoring>
|
||||
{
|
||||
public override void Bake(SpitterProjectilePrefabAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.None);
|
||||
AddComponent(entity, new SpitterProjectilePrefab
|
||||
{
|
||||
Prefab = authoring.ProjectilePrefab != null
|
||||
? GetEntity(authoring.ProjectilePrefab, TransformUsageFlags.Dynamic) : Entity.Null,
|
||||
MaxLiveProjectiles = authoring.MaxLiveProjectiles,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ce5223c5fd56694c81991e1bb1232de
|
||||
@@ -1,25 +0,0 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// MC-2 — marks a Husk prefab as a SWARMER variant (the "surround" question). Compose WITH
|
||||
/// <see cref="EnemyAuthoring"/> on the prefab root, tuned fast + low-HP + fast frequent low-chip bites (via the
|
||||
/// EnemyAuthoring fields). This bakes only the <see cref="SwarmerTag"/> marker: a Swarmer has NO AI branch (it
|
||||
/// falls through the Grunt seek+strike pass); the tag drives the director's CLUSTER spawn (a pack per slot) + a
|
||||
/// client tint. Keeps EnemyTag + RegionTag like every Husk.
|
||||
/// </summary>
|
||||
public class SwarmerAuthoring : MonoBehaviour
|
||||
{
|
||||
private class SwarmerBaker : Baker<SwarmerAuthoring>
|
||||
{
|
||||
public override void Bake(SwarmerAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<SwarmerTag>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6a84b442d0535642abc303c01546a15
|
||||
Reference in New Issue
Block a user