LANTERN kit into the shipping scene + frame rename (audit H2/M4)

H2 was the audit's sharpest finding: in Game.unity every player spawned
with four ability sockets pointing at SparkIds the baked AbilityDatabase
did not contain, so all four resolved to Damage=0 Range=0 Cooldown=0.
Melee and dash were the only working combat verbs in the built game.
Cause: the 5 LANTERN Sparks were added to GymSub.unity and never to
Gameplay.unity.

- Gameplay.unity's AbilityDatabaseAuthoring now carries all 9 defs (the
  4 legacy ids keep their numbers; Sparks are 5-9) with their effect
  prefabs. Live-verified in Play: sockets now read
  Vortex 8dmg/6range/420cd, Blink 20range/1cd, Hook & Pull
  15dmg/25range/120cd, Light Zone 6dmg/5range/480cd.
- Removed 6 orphaned authoring GameObjects the purge left behind in the
  subscene (StorageSpawner, StructureCatalog, ItemDatabase,
  SpitterProjectileConfig, BoonCatalog, MetaCatalog) and the RoomDressing
  object in Game.unity — the latter is what scattered 47 Synty desert
  props into the seabed murk.
- Deleted 4 now-unreferenced prefabs: EnemySpit, Pylon, Storage, Wall.
- Frame rename (M4): FrameKind.Warrior/Ranger -> Bathynaut/Harpooner,
  93 identifier sites. Byte values pinned (2/3), so no ghost-hash or save
  impact. The menu said "Warrior"/"Ranger" to players three weeks after
  the frames were renamed in design.
- Menu now reads LANTERN / "Light is territory — co-op descent" instead
  of "PROJECT M" / "Frontier colony — co-op" (the Awakening-Engine
  tagline, two directions stale).
- Removed the "Replay Tutorial" button and the Settings ONBOARDING
  section: both drove coach-marks DR-051 deleted. The settings fields
  still round-trip so existing settings files load unchanged.

All four project scenes + all prefabs verified free of missing scripts.
Server measured at 59.6 ticks/s against a 60 Hz target. 295/295 green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-07 13:11:58 -07:00
parent 62e48a3b0b
commit 9f61f7c6fe
28 changed files with 88 additions and 1465 deletions
@@ -6,8 +6,8 @@ using UnityEngine.InputSystem;
namespace ProjectM.Client
{
/// <summary>
/// EDITOR-ONLY dev hotkey to switch the local player's class while playtesting: <b>F1 = Warrior</b>,
/// <b>F2 = Ranger</b>. The <see cref="DebugOverlay"/>'s Class buttons only live in the DevSandbox scene, so this
/// EDITOR-ONLY dev hotkey to switch the local player's class while playtesting: <b>F1 = Bathynaut</b>,
/// <b>F2 = Harpooner</b>. The <see cref="DebugOverlay"/>'s Class buttons only live in the DevSandbox scene, so this
/// keybind makes the swap reachable in the real menu -> Game flow too (no scene wiring needed). It enqueues the
/// SAME authoritative <see cref="ProjectM.Simulation.DebugCommandRequest"/> (DebugOp.SetClass) the overlay buttons
/// do, via <see cref="DebugCommandSendSystem"/> — the server strips/re-seeds the class traits, swaps the Fire
@@ -24,9 +24,9 @@ namespace ProjectM.Client
return;
if (kb.f1Key.wasPressedThisFrame)
DebugCommandSendSystem.SetWarrior();
DebugCommandSendSystem.SetBathynaut();
else if (kb.f2Key.wasPressedThisFrame)
DebugCommandSendSystem.SetRanger();
DebugCommandSendSystem.SetHarpooner();
}
}
}
@@ -39,8 +39,8 @@ namespace ProjectM.Client
public static void SetTuning(byte knob, float value) => Send(DebugOp.SetTuning, knob, Mathf.RoundToInt(value * 1000f));
/// <summary>Swap the sender's class to <paramref name="classId"/> (a <see cref="ProjectM.Simulation.FrameKind"/> byte); server-authoritative (class-switch dev tool).</summary>
public static void SetClass(byte classId) => Send(DebugOp.SetClass, classId);
public static void SetWarrior() => SetClass(ClassTraits.WarriorClass);
public static void SetRanger() => SetClass(ClassTraits.RangerClass);
public static void SetBathynaut() => SetClass(ClassTraits.BathynautFrame);
public static void SetHarpooner() => SetClass(ClassTraits.HarpoonerFrame);
/// <summary>GYM: spawn enemy KIND (a <see cref="ProjectM.Simulation.GymEnemyKind"/> byte) near the sender, count times.</summary>
public static void SpawnEnemy(byte kind, int count = 1) => Send(DebugOp.SpawnEnemy, kind, count);
@@ -69,8 +69,8 @@ namespace ProjectM.Client
GUILayout.Space(6);
GUILayout.Label("- Class (F1/F2) -");
GUILayout.BeginHorizontal();
if (GUILayout.Button("Warrior")) DebugCommandSendSystem.SetWarrior();
if (GUILayout.Button("Ranger")) DebugCommandSendSystem.SetRanger();
if (GUILayout.Button("Bathynaut")) DebugCommandSendSystem.SetBathynaut();
if (GUILayout.Button("Harpooner")) DebugCommandSendSystem.SetHarpooner();
GUILayout.EndHorizontal();
GUILayout.Space(6);
@@ -68,8 +68,8 @@ namespace ProjectM.Client
switch (idx)
{
case 0: // Controls (chosen class)
bool ranger = WorldLauncher.SelectedClass == (byte)FrameKind.Ranger;
Head(c, ranger ? "CLASS: Ranger (ranged anchor)" : "CLASS: Warrior (melee anchor)");
bool ranger = WorldLauncher.SelectedClass == (byte)FrameKind.Harpooner;
Head(c, ranger ? "CLASS: Harpooner (ranged anchor)" : "CLASS: Bathynaut (melee anchor)");
Body(c, "Move — WASD / Left Stick");
Body(c, "Aim — Mouse cursor / Right Stick");
Body(c, "Attack — LMB / X (3-hit melee combo — the finisher hits hard)");
@@ -78,8 +78,8 @@ namespace ProjectM.Client
void BuildMain(VisualElement root)
{
_mainPanel = MenuUi.FullScreenRoot(true);
var card = MenuUi.Card("PROJECT M");
card.Add(MenuUi.Caption("Frontier colony — co-op"));
var card = MenuUi.Card("LANTERN");
card.Add(MenuUi.Caption("Light is territory — co-op descent"));
// Why the last session ended (connection watchdog / bad join address) — shown once, then cleared.
if (!string.IsNullOrEmpty(SessionEnd.Reason))
{
@@ -91,7 +91,7 @@ namespace ProjectM.Client
card.Add(reason);
}
// Slice 2: class picker -> sets WorldLauncher.SelectedClass for the next session (Warrior melee / Ranger ranged).
// Slice 2: class picker -> sets WorldLauncher.SelectedClass for the next session (Bathynaut melee / Harpooner ranged).
_classLabel = new Label(ClassName(WorldLauncher.SelectedClass));
_classLabel.style.unityTextAlign = TextAnchor.MiddleCenter;
_classLabel.style.marginTop = 6; _classLabel.style.marginBottom = 2;
@@ -99,8 +99,8 @@ namespace ProjectM.Client
var classRow = new VisualElement();
classRow.style.flexDirection = FlexDirection.Row;
classRow.style.justifyContent = Justify.Center;
classRow.Add(MenuUi.Button("Warrior", () => SelectClass((byte)FrameKind.Warrior)));
classRow.Add(MenuUi.Button("Ranger", () => SelectClass((byte)FrameKind.Ranger)));
classRow.Add(MenuUi.Button("Bathynaut", () => SelectClass((byte)FrameKind.Bathynaut)));
classRow.Add(MenuUi.Button("Harpooner", () => SelectClass((byte)FrameKind.Harpooner)));
card.Add(classRow);
card.Add(MenuUi.Button("Single Player", () => Launch(SessionMode.Single, false)));
@@ -118,18 +118,9 @@ namespace ProjectM.Client
card.Add(MenuUi.Button("Settings", ShowSettings));
card.Add(MenuUi.Button("How to Play", ShowHowToPlay));
// Re-arm the first-run coach-marks (clears the client-local completed-step mask). The next session
// replays them; the How-to-Play card stays available regardless.
Button replayBtn = null;
replayBtn = MenuUi.Button("Replay Tutorial", () =>
{
var s = SettingsService.Current;
s.OnboardingMask = 0;
s.TutorialHints = 1;
SettingsService.Save(s);
if (replayBtn != null) replayBtn.text = "Tutorial armed ✓";
});
card.Add(replayBtn);
// 2026-08-07 audit purge: the "Replay Tutorial" button re-armed first-run coach-marks whose system
// DR-051 deleted — it wrote OnboardingMask/TutorialHints that nothing reads. Removed rather than left
// as a button that visibly does nothing. The How-to-Play card above is the real reference.
card.Add(MenuUi.Button("Quit", Quit));
@@ -149,7 +140,7 @@ namespace ProjectM.Client
if (_classLabel != null) _classLabel.text = ClassName(classId);
}
static string ClassName(byte classId) => classId == (byte)FrameKind.Ranger ? "CLASS: Ranger (ranged)" : "CLASS: Warrior (melee)";
static string ClassName(byte classId) => classId == (byte)FrameKind.Harpooner ? "CLASS: Harpooner (ranged)" : "CLASS: Bathynaut (melee)";
void ShowSettings()
{
@@ -59,22 +59,9 @@ namespace ProjectM.Client
card.Add(VolumeRow("Music", working.Music, v => { working.Music = v; GameVolume.Music = v; }));
card.Add(VolumeRow("SFX", working.Sfx, v => { working.Sfx = v; GameVolume.Sfx = v; }));
// ---------------- Onboarding ----------------
card.Add(MenuUi.Caption("— ONBOARDING —"));
string[] onoff = { "Off", "On" };
card.Add(CycleRow("Tutorial Hints",
() => onoff[Mathf.Clamp(working.TutorialHints, 0, 1)],
dir => working.TutorialHints = Wrap(working.TutorialHints + dir, 2)));
// DEV: forces the first-run coach-marks to replay fresh on every launch (wipes the completed-step mask at
// each boot — see SettingsService.Boot). Off = normal once-only first-run behaviour.
#if UNITY_EDITOR // D7: dev-only onboarding replay toggle — hidden from the public demo Settings so a player can't lock themselves into permanent tutorial
card.Add(CycleRow("Force Each Launch (Dev)",
() => onoff[Mathf.Clamp(working.ForceOnboardingEachLaunch, 0, 1)],
dir => working.ForceOnboardingEachLaunch = Wrap(working.ForceOnboardingEachLaunch + dir, 2)));
#endif
// 2026-08-07 audit purge: the ONBOARDING section (Tutorial Hints + the dev Force-Each-Launch toggle)
// drove coach-marks DR-051 deleted. The settings still round-trip the fields so an existing settings
// file loads unchanged — they just no longer pretend to be a control.
// ---------------- Buttons ----------------
var apply = MenuUi.Button("Apply", () => SettingsService.SaveAndApply(working));
@@ -29,7 +29,7 @@ namespace ProjectM.Client
public static bool Busy { get; private set; }
/// <summary>Slice 2: the frame chosen in the menu (a FrameKind byte), seeded into the client world at session start.</summary>
public static byte SelectedClass = (byte)FrameKind.Warrior;
public static byte SelectedClass = (byte)FrameKind.Bathynaut;
/// <summary>The mode of the most recently started session — the HUD's outcome banner branches on it
/// (single: PLAY AGAIN restarts; co-op: the honest exit is a clean teardown for everyone).</summary>
@@ -72,7 +72,7 @@ namespace ProjectM.Server
// Slice 2 -> LANTERN: seed the chosen frame on the just-instantiated player. The 4-socket Spark
// loadout IS the ability model (the legacy single-AbilityRef path is deleted); the DRG-asymmetry
// traits ride permanent StatModifiers (CharacterStatsRef stays Default -> deltas replicate via the
// OwnerSendType.All buffer). 0 -> Warrior/Bathynaut.
// OwnerSendType.All buffer). 0 -> Bathynaut/Bathynaut.
byte classId = ClassTraits.Normalize(goReq.ValueRO.ClassId);
ClassTraits.AppendSeeds(classId, player, ecb);
// Expedition redesign: the server-only class anchor the meta systems key on (born-correct meta
@@ -10,7 +10,7 @@ namespace ProjectM.Simulation
/// </summary>
public struct ClassSelectRequest : IRpcCommand
{
/// <summary>Requested class id (0/unknown → Warrior via ClassTraits.Normalize).</summary>
/// <summary>Requested class id (0/unknown → Bathynaut via ClassTraits.Normalize).</summary>
public byte ClassId;
}
}
@@ -7,7 +7,7 @@ namespace ProjectM.Simulation
/// singleton by the menu / WorldLauncher before going in-game. <see cref="GoInGameRequest"/> picks it up
/// (GoInGameClientSystem) so the server seeds the right class at spawn. NOT replicated — it is client-local
/// intent; the class travels to the server via the RPC, then back to all clients via the seeded StatModifiers +
/// the replicated AbilityRef. 0 = unset (the server defaults to Warrior).
/// the replicated AbilityRef. 0 = unset (the server defaults to Bathynaut).
/// </summary>
public struct ClassSelection : IComponentData
{
@@ -26,7 +26,7 @@ namespace ProjectM.Simulation
/// <summary>Heal/down-clamp a LIVING player's Current to the new class's full max (blob base folded with the
/// just-reseeded <paramref name="mods"/>, like StatRecomputeSystem). Doubles as the down-clamp when the new
/// class's max is lower (Warrior +30 HP vs Ranger -15%). No-op on a corpse (Current&lt;=0) — respawn refills.</summary>
/// class's max is lower (Bathynaut +30 HP vs Harpooner -15%). No-op on a corpse (Current&lt;=0) — respawn refills.</summary>
public static void HealClamp(ref Health health, float baseMaxHealth, DynamicBuffer<StatModifier> mods)
{
if (health.Current > 0f)
@@ -11,11 +11,11 @@ namespace ProjectM.Simulation
/// <para>
/// Trait deltas seed onto the <see cref=\"FrameKind.Default\"/> character (no per-class blob row needed — the
/// deltas ride the replicated StatModifier buffer, OwnerSendType.All, so the owning client folds the correct
/// EffectiveCharacterStats). The DRG-asymmetry (operator-locked): <b>Warrior</b> = melee bruiser (tankier,
/// slower, harder + longer-reach melee via MeleeDamage/MeleeRange); <b>Ranger</b> = ranged anchor (faster,
/// squishier, longer projectile range + a wider auto-target assist — the co-op synergy hook the Warrior's
/// knockback feeds). The Warrior's Fire = the aim-directed cone (<see cref="AbilityId.WarriorCone"/>); the
/// Ranger's Fire = the default projectile (<see cref="AbilityId.Primary"/>).
/// EffectiveCharacterStats). The DRG-asymmetry (operator-locked): <b>Bathynaut</b> = melee bruiser (tankier,
/// slower, harder + longer-reach melee via MeleeDamage/MeleeRange); <b>Harpooner</b> = ranged anchor (faster,
/// squishier, longer projectile range + a wider auto-target assist — the co-op synergy hook the Bathynaut's
/// knockback feeds). The Bathynaut's Fire = the aim-directed cone (<see cref="AbilityId.WarriorCone"/>); the
/// Harpooner's Fire = the default projectile (<see cref="AbilityId.Primary"/>).
/// </para>
/// <para>
/// <see cref="Reapply"/> swaps an already-spawned player's class IN PLACE (strip the old class seeds, re-seed
@@ -26,28 +26,28 @@ namespace ProjectM.Simulation
/// </summary>
public static class ClassTraits
{
public const byte WarriorClass = (byte)FrameKind.Warrior;
public const byte RangerClass = (byte)FrameKind.Ranger;
public const byte BathynautFrame = (byte)FrameKind.Bathynaut;
public const byte HarpoonerFrame = (byte)FrameKind.Harpooner;
/// <summary>How many trait modifiers a class seeds (each on a distinct SourceId at ClassSourceId + i).</summary>
public const int ClassSeedCount = 4;
/// <summary>Normalize a wire ClassId to a known class (0 / unknown -> Warrior).</summary>
public static byte Normalize(byte classId) => classId == RangerClass ? RangerClass : WarriorClass;
/// <summary>Normalize a wire ClassId to a known class (0 / unknown -> Bathynaut).</summary>
public static byte Normalize(byte classId) => classId == HarpoonerFrame ? HarpoonerFrame : BathynautFrame;
/// <summary>The Fire-slot ability id for a class (Warrior = cone, Ranger = the default projectile).</summary>
/// <summary>The Fire-slot ability id for a class (Bathynaut = cone, Harpooner = the default projectile).</summary>
/// <summary>The class a Fire-slot ability id implies — the exact inverse of <see cref="AbilityFor"/> (Ranger
/// <summary>The class a Fire-slot ability id implies — the exact inverse of <see cref="AbilityFor"/> (Harpooner
/// iff Primary). Lets the CLIENT derive the local class from the replicated <see cref="AbilityRef"/> (tracks
/// the dev class-switch, unlike the menu's ClassSelection static; PlayerClass itself is server-only).</summary>
/// <summary>Default 4-socket Spark loadout per frame (Harpooner = the Ranger slot, line-and-iron; Bathynaut =
/// the Warrior slot, anchor-and-crash). Tunable; drives the gym's per-frame default sockets (Build Spec step 5).</summary>
/// <summary>Default 4-socket Spark loadout per frame (Harpooner = the Harpooner slot, line-and-iron; Bathynaut =
/// the Bathynaut slot, anchor-and-crash). Tunable; drives the gym's per-frame default sockets (Build Spec step 5).</summary>
public static void FrameLoadout(byte classId, out byte s0, out byte s1, out byte s2, out byte s3)
{
if (classId == RangerClass) // Harpooner: reel primary + mobility + skillshots
if (classId == HarpoonerFrame) // Harpooner: reel primary + mobility + skillshots
{
s0 = (byte)AbilityId.HookPull; s1 = (byte)AbilityId.Blink; s2 = (byte)AbilityId.DecoyWisp; s3 = (byte)AbilityId.LightZone;
}
@@ -70,7 +70,7 @@ namespace ProjectM.Simulation
static void Seeds(byte classId, Span<StatModifier> seeds)
{
uint src = Tuning.ClassSourceId;
if (classId == RangerClass)
if (classId == HarpoonerFrame)
{
seeds[0] = new StatModifier { Target = (byte)StatTarget.MoveSpeed, Op = (byte)ModOp.PercentMult, Value = 0.15f, SourceId = src };
seeds[1] = new StatModifier { Target = (byte)StatTarget.MaxHealth, Op = (byte)ModOp.PercentMult, Value = -0.15f, SourceId = src + 1u };
@@ -7,7 +7,7 @@ namespace ProjectM.Simulation
Primary = 1,
FastLight = 2,
SlowHeavy = 3,
WarriorCone = 4, // Slice 2: the Warrior's aim-directed short-range cone secondary (Fire slot)
WarriorCone = 4, // Slice 2: the Bathynaut's aim-directed short-range cone secondary (Fire slot)
// LANTERN Phase 1 Sparks (the gym's first socketables):
DecoyWisp = 5, // Aoe/spawn: a decoy ghost that draws aggro
HookPull = 6, // Projectile + pull: the Harpooner reel (yanks the hit target in)
@@ -23,8 +23,8 @@ namespace ProjectM.Simulation
{
None = 0,
Default = 1,
Warrior = 2, // Bathynaut-lineage melee-anchor bruiser (tankier, slower, longer/harder melee)
Ranger = 3, // Harpooner-lineage ranged-anchor (squishier, faster, longer projectile range; weaker melee)
Bathynaut = 2, // Bathynaut-lineage melee-anchor bruiser (tankier, slower, longer/harder melee)
Harpooner = 3, // Harpooner-lineage ranged-anchor (squishier, faster, longer projectile range; weaker melee)
}
/// <summary>
@@ -42,8 +42,8 @@ namespace ProjectM.Simulation
MoveSpeed = 6,
TurnRate = 7,
MaxHealth = 8,
MeleeDamage = 9, // Slice 2: melee combo + Warrior cone damage axis (folded onto TuningConfig.MeleeDamage)
MeleeRange = 10, // Slice 2: melee reach axis (Warrior longer, Ranger shorter)
MeleeDamage = 9, // Slice 2: melee combo + Bathynaut cone damage axis (folded onto TuningConfig.MeleeDamage)
MeleeRange = 10, // Slice 2: melee reach axis (Bathynaut longer, Harpooner shorter)
}
/// <summary>How a <see cref="StatModifier"/> combines into the effective stat.</summary>
@@ -7,5 +7,5 @@ namespace ProjectM.Simulation
/// NetworkStreamInGame to the connection (enabling snapshot/command flow) and spawns the
/// client's player ghost. Lives in Simulation so both worlds see the type for RPC source-gen.
/// </summary>
public struct GoInGameRequest : IRpcCommand { public byte ClassId; } // Slice 2: per-player class (FrameKind byte; 0 -> server defaults to Warrior)
public struct GoInGameRequest : IRpcCommand { public byte ClassId; } // Slice 2: per-player class (FrameKind byte; 0 -> server defaults to Bathynaut)
}
@@ -59,9 +59,9 @@ namespace ProjectM.Simulation
/// <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="FrameKind"/> byte: Warrior=2 / Ranger=3).
/// <summary>Swap the sender's class to ArgA (a <see cref="FrameKind"/> byte: Bathynaut=2 / Harpooner=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>
/// player to the new class's max. Editor-only dev tool (class-switch); 0 / unknown -> Bathynaut.</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>
@@ -11,7 +11,7 @@ namespace ProjectM.Simulation
}
/// <summary>One persisted per-class PERMANENT meta-upgrade tier (v6). ClassId = the normalized FrameKind
/// (Warrior=2/Ranger=3); UpgradeId = the append-only meta-catalog key (unknown ids round-trip preserved and are
/// (Bathynaut=2/Harpooner=3); UpgradeId = the append-only meta-catalog key (unknown ids round-trip preserved and are
/// skipped live); Tier clamps to the catalog's MaxTier at seed/shop/spend, never at rest.</summary>
[Serializable]
public struct MetaUpgradeSave
+1 -1
View File
@@ -237,7 +237,7 @@ namespace ProjectM.Simulation
/// <summary>Base for per-slot equipment SourceIds; slot i tags its mods with <c>EquipSourceIdBase + i</c>.</summary>
public const uint EquipSourceIdBase = 0x00E91000u;
/// <summary>Slice 2: base SourceId for a class's permanent trait StatModifiers (Warrior/Ranger seeds).
/// <summary>Slice 2: base SourceId for a class's permanent trait StatModifiers (Bathynaut/Harpooner seeds).
/// DISJOINT from equipment/upgrade/debug ranges; class traits are NEVER stripped (permanent per session).</summary>
public const uint ClassSourceId = 0x00C1A550u;
}