Run Re-Do
This commit is contained in:
@@ -9,6 +9,18 @@ namespace ProjectM.Simulation
|
||||
public int ItemId;
|
||||
public int Count;
|
||||
}
|
||||
|
||||
/// <summary>One persisted per-class PERMANENT meta-upgrade tier (v6). ClassId = the normalized CharacterId
|
||||
/// (Warrior=2/Ranger=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 (M7). Flat scalars (JsonUtility has no int2). The production
|
||||
/// cooldown is stored as REMAINING ticks (epoch-independent) so it survives the server-tick origin reset on a
|
||||
@@ -51,7 +63,7 @@ namespace ProjectM.Simulation
|
||||
[Serializable]
|
||||
public class SaveData
|
||||
{
|
||||
public const int CurrentVersion = 5; // END-2: v5 adds RunOutcome (a won/lost run loads finished); v4 added CoreCurrent
|
||||
public const int CurrentVersion = 6; // v6: permanent META (per-class upgrade tiers + run counters); v5 added RunOutcomeoreCurrent
|
||||
|
||||
/// <summary>Oldest save schema the loader accepts (additive); a v2 save loads with structures at full HP.</summary>
|
||||
public const int MinLoadableVersion = 2;
|
||||
@@ -62,6 +74,11 @@ namespace ProjectM.Simulation
|
||||
public int CoreCurrent; // END-1: Engine Core integrity at save time (0 from a pre-v4 save -> restored to baked Max)
|
||||
public int RunOutcome; // END-2: 0=InProgress (also any pre-v5 save) / 1=Victory / 2=Loss -> a finished run loads finished
|
||||
|
||||
// v6 — permanent meta-progression (0/empty-defaults on any v<=5 save):
|
||||
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 StructureIoRow[] StructureIo = Array.Empty<StructureIoRow>();
|
||||
|
||||
Reference in New Issue
Block a user