mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Add notation for language-specific save types
This commit is contained in:
parent
a34434f7cb
commit
fb4734472b
6 changed files with 21 additions and 4 deletions
|
@ -12,6 +12,9 @@ namespace PKHeX.Core
|
|||
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;
|
||||
|
||||
|
|
|
@ -8,8 +8,12 @@ namespace PKHeX.Core
|
|||
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<ushort> HeldItems => Array.Empty<ushort>();
|
||||
|
|
|
@ -12,6 +12,9 @@ namespace PKHeX.Core
|
|||
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; }
|
||||
|
||||
|
|
|
@ -7,12 +7,16 @@ namespace PKHeX.Core
|
|||
/// <summary>
|
||||
/// Generation 3 <see cref="SaveFile"/> object.
|
||||
/// </summary>
|
||||
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:
|
||||
|
|
|
@ -8,11 +8,14 @@ namespace PKHeX.Core
|
|||
/// <summary>
|
||||
/// Generation 4 <see cref="SaveFile"/> object for My Pokémon Ranch saves.
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/// <summary>
|
||||
/// <see cref="SaveFile"/> behaves differently for different languages (different structure layout).
|
||||
/// </summary>
|
||||
public interface ILangDeviantSave
|
||||
public interface ILangDeviantSave : ISaveFileRevision
|
||||
{
|
||||
bool Japanese { get; }
|
||||
bool Korean { get; }
|
||||
|
|
Loading…
Reference in a new issue