9f61f7c6fe
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>
59 lines
2.4 KiB
C#
59 lines
2.4 KiB
C#
using System;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>One serialized ledger row (item id + count). An array FIELD of <see cref="SaveData"/>.</summary>
|
|
[Serializable]
|
|
public struct LedgerRow
|
|
{
|
|
public int ItemId;
|
|
public int Count;
|
|
}
|
|
|
|
/// <summary>One persisted per-class PERMANENT meta-upgrade tier (v6). ClassId = the normalized FrameKind
|
|
/// (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
|
|
{
|
|
public byte ClassId;
|
|
public byte UpgradeId;
|
|
public byte Tier;
|
|
}
|
|
|
|
/// <summary>One serialized player-built structure. Flat scalars (JsonUtility has no int2).</summary>
|
|
[Serializable]
|
|
public struct StructureSave
|
|
{
|
|
public byte Type;
|
|
public int CellX;
|
|
public int CellZ;
|
|
public float HP; // EB-1: hit points at save time (0 -> restored to baked Max)
|
|
}
|
|
|
|
/// <summary>
|
|
/// Versioned, host-authoritative save slice: the shared resource ledger + player-built structures + the
|
|
/// permanent meta. JsonUtility-friendly — a class with flat fields and an array FIELD (never a root array).
|
|
/// The schema is ADDITIVE going forward, gated by <see cref="Version"/> migration.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class SaveData
|
|
{
|
|
public const int CurrentVersion = 7; // v7: LANTERN fresh epoch — goal/core/outcome + conveyor/machine-I/O fields dropped
|
|
|
|
/// <summary>Oldest save schema the loader accepts. v7 is a FRESH EPOCH (operator-approved): older saves are ignored.</summary>
|
|
public const int MinLoadableVersion = 7;
|
|
|
|
public int Version = CurrentVersion;
|
|
|
|
// Permanent meta-progression:
|
|
public int RunsCompleted; // boss-cleared runs (the HUD counter + the HostSalt fold at restore)
|
|
public int MaxDepthReached; // deepest room actually CLEARED across all runs (honest depth, never planned)
|
|
public MetaUpgradeSave[] MetaUpgrades = Array.Empty<MetaUpgradeSave>(); // sparse per-class tiers
|
|
|
|
public LedgerRow[] Ledger = Array.Empty<LedgerRow>();
|
|
public StructureSave[] Structures = Array.Empty<StructureSave>();
|
|
public long SavedAtMs;
|
|
}
|
|
}
|