Files
TheriapolisV3/Theriapolis.Core/Persistence/SaveMigrations/V5ToV6Migration.cs
T
Christopher Wiebe b451f83174 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>
2026-04-30 20:40:51 -07:00

28 lines
1.1 KiB
C#

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.
}
}