diff --git a/PKHeX.Core/Saves/SAV1.cs b/PKHeX.Core/Saves/SAV1.cs index d64727725..c1c2ec637 100644 --- a/PKHeX.Core/Saves/SAV1.cs +++ b/PKHeX.Core/Saves/SAV1.cs @@ -12,6 +12,9 @@ public sealed class SAV1 : SaveFile, ILangDeviantSave protected override string BAKText => $"{OT} ({Version}) - {PlayTimeString}"; public override string Filter => "SAV File|*.sav|All Files|*.*"; public override string Extension => ".sav"; + + public int SaveRevision => Japanese ? 0 : 1; + public string SaveRevisionString => Japanese ? "J" : "U"; public bool Japanese { get; } public bool Korean => false; diff --git a/PKHeX.Core/Saves/SAV1Stadium.cs b/PKHeX.Core/Saves/SAV1Stadium.cs index abbc0379b..5d867072f 100644 --- a/PKHeX.Core/Saves/SAV1Stadium.cs +++ b/PKHeX.Core/Saves/SAV1Stadium.cs @@ -8,8 +8,12 @@ public sealed class SAV1Stadium : SaveFile, ILangDeviantSave protected override string BAKText => $"{OT} ({Version}) - {PlayTimeString}"; public override string Filter => "SAV File|*.sav|All Files|*.*"; public override string Extension => ".sav"; + + public int SaveRevision => Japanese ? 0 : 1; + public string SaveRevisionString => Japanese ? "J" : "U"; public bool Japanese { get; } public bool Korean => false; + public override PersonalTable Personal => PersonalTable.Y; public override int MaxEV => ushort.MaxValue; public override IReadOnlyList HeldItems => Array.Empty(); diff --git a/PKHeX.Core/Saves/SAV2.cs b/PKHeX.Core/Saves/SAV2.cs index ef82fcb8f..ec51cfa5a 100644 --- a/PKHeX.Core/Saves/SAV2.cs +++ b/PKHeX.Core/Saves/SAV2.cs @@ -12,6 +12,9 @@ public sealed class SAV2 : SaveFile, ILangDeviantSave protected override string BAKText => $"{OT} ({Version}) - {PlayTimeString}"; public override string Filter => "SAV File|*.sav|All Files|*.*"; public override string Extension => ".sav"; + + public int SaveRevision => Japanese ? 0 : !Korean ? 1 : 2; + public string SaveRevisionString => Japanese ? "J" : !Korean ? "U" : "K"; public bool Japanese { get; } public bool Korean { get; } diff --git a/PKHeX.Core/Saves/SAV3.cs b/PKHeX.Core/Saves/SAV3.cs index 49a675dd8..dd22663ec 100644 --- a/PKHeX.Core/Saves/SAV3.cs +++ b/PKHeX.Core/Saves/SAV3.cs @@ -7,12 +7,16 @@ namespace PKHeX.Core /// /// Generation 3 object. /// - public sealed class SAV3 : SaveFile + public sealed class SAV3 : SaveFile, ILangDeviantSave { protected override string BAKText => $"{OT} ({Version}) - {PlayTimeString}"; public override string Filter => "SAV File|*.sav|All Files|*.*"; public override string Extension => ".sav"; - public readonly bool Japanese; + + public int SaveRevision => Japanese ? 0 : 1; + public string SaveRevisionString => Japanese ? "J" : "U"; + public bool Japanese { get; } + public bool Korean => false; public bool IndeterminateGame => Version == GameVersion.Unknown; /* SAV3 Structure: diff --git a/PKHeX.Core/Saves/Storage/SAV4Ranch.cs b/PKHeX.Core/Saves/Storage/SAV4Ranch.cs index 27814fc7a..3be060565 100644 --- a/PKHeX.Core/Saves/Storage/SAV4Ranch.cs +++ b/PKHeX.Core/Saves/Storage/SAV4Ranch.cs @@ -8,11 +8,14 @@ namespace PKHeX.Core /// /// Generation 4 object for My Pokémon Ranch saves. /// - public sealed class SAV4Ranch : BulkStorage + public sealed class SAV4Ranch : BulkStorage, ISaveFileRevision { protected override int SIZE_STORED => 0x88 + 0x1C; protected override int SIZE_PARTY => SIZE_STORED; + public int SaveRevision => Version == GameVersion.DP ? 0 : 1; + public string SaveRevisionString => Version == GameVersion.DP ? "-DP" : "-Pt"; + public override int BoxCount { get; } public override int SlotCount { get; } diff --git a/PKHeX.Core/Saves/Util/ILangDeviantSave.cs b/PKHeX.Core/Saves/Util/ILangDeviantSave.cs index b6adaa2e8..4b3199910 100644 --- a/PKHeX.Core/Saves/Util/ILangDeviantSave.cs +++ b/PKHeX.Core/Saves/Util/ILangDeviantSave.cs @@ -3,7 +3,7 @@ /// /// behaves differently for different languages (different structure layout). /// - public interface ILangDeviantSave + public interface ILangDeviantSave : ISaveFileRevision { bool Japanese { get; } bool Korean { get; }