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,30 @@
|
||||
namespace Theriapolis.Core.Persistence.SaveMigrations;
|
||||
|
||||
/// <summary>
|
||||
/// Phase 6.5 M0 — additive migration from save schema v6 (Phase 6 ship) to
|
||||
/// v7 (Phase 6.5 levelling). Non-destructive: every v6 field carries over
|
||||
/// unchanged. The new <see cref="PlayerCharacterState.SubclassId"/>,
|
||||
/// <see cref="PlayerCharacterState.LearnedFeatureIds"/>, and
|
||||
/// <see cref="PlayerCharacterState.LevelUpHistory"/> default-initialise
|
||||
/// to empty values by the constructor, so this migration just bumps the
|
||||
/// header version.
|
||||
///
|
||||
/// Phase-6 saves had no level-up history (every character stayed at level
|
||||
/// 1, Xp = 0). On load they continue to be valid level-1 characters; the
|
||||
/// player can immediately start earning XP and levelling up under the new
|
||||
/// rules.
|
||||
/// </summary>
|
||||
public sealed class V6ToV7Migration : ISaveMigration
|
||||
{
|
||||
public int FromVersion => 6;
|
||||
public int ToVersion => 7;
|
||||
|
||||
public void Apply(SaveHeader header, SaveBody body)
|
||||
{
|
||||
// No data translation needed. PlayerCharacterState's new fields
|
||||
// (SubclassId, LearnedFeatureIds, LevelUpHistory) default-initialise
|
||||
// to empty in their record, and SaveCodec.ReadCharacter handles
|
||||
// missing-section bytes via the EOS-check pattern Phase 5 already
|
||||
// established. Pure version bump.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user