using System; using static PKHeX.Core.Gem8Version; namespace PKHeX.Core; /// /// Indicates various revision values which change on each major patch update, updating the structure of the stored player save data. /// public enum Gem8Version { None = 0, /// /// Initial cartridge version shipped. /// /// V1_0 = 0x25, // 37 /// /// November 2021 pre-release patch. /// /// V1_1 = 0x2C, // 44 /// /// February 2022 patch. /// /// V1_2 = 0x32, // 50 /// /// March 2022 patch. /// /// V1_3 = 0x34, // 52 } public static class Gem8VersionExtensions { /// /// Returns a string to append to the savedata type info, indicating the revision of the player save data. /// /// Stored version value in the save data. public static string GetSuffixString(this Gem8Version version) => version switch { V1_0 => "-1.0.0", // Launch Revision V1_1 => "-1.1.0", // 1.1.0 V1_2 => "-1.2.0", // 1.2.0 V1_3 => "-1.3.0", // 1.3.0 _ => throw new ArgumentOutOfRangeException(nameof(version)), }; }