Initial commit: Theriapolis baseline at port/godot branch point
Captures the pre-Godot-port state of the codebase. This is the rollback anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md). All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace Theriapolis.Core.Persistence.SaveMigrations;
|
||||
|
||||
/// <summary>
|
||||
/// Phase 6 M2 — additive migration from save schema v5 (Phase 5 ship) to
|
||||
/// v6 (Phase 6 reputation core). Non-destructive: every v5 field carries
|
||||
/// over unchanged. The new <see cref="SaveBody.ReputationState"/> is
|
||||
/// already initialised to a fresh empty <see cref="ReputationSnapshot"/>
|
||||
/// by the SaveBody constructor, so this migration just bumps the header
|
||||
/// version.
|
||||
///
|
||||
/// Phase 5's placeholder <see cref="SaveBody.Factions"/> and
|
||||
/// <see cref="SaveBody.Reputation"/> dictionaries were never populated
|
||||
/// (Phase 5 didn't ship the reputation system), so we don't need to
|
||||
/// translate any data — they stay empty and ignored.
|
||||
/// </summary>
|
||||
public sealed class V5ToV6Migration : ISaveMigration
|
||||
{
|
||||
public int FromVersion => 5;
|
||||
public int ToVersion => 6;
|
||||
|
||||
public void Apply(SaveHeader header, SaveBody body)
|
||||
{
|
||||
// Body fields all default-initialise to empty in SaveBody — the
|
||||
// ReputationState is already a fresh ReputationSnapshot. Phase-5
|
||||
// saves had nothing to translate, so this is a pure version bump.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user