diff --git a/PKHeX.Core/Legality/Moves/Breeding/EggSource.cs b/PKHeX.Core/Legality/Moves/Breeding/EggSource.cs index 4e032fdf9..a90f46110 100644 --- a/PKHeX.Core/Legality/Moves/Breeding/EggSource.cs +++ b/PKHeX.Core/Legality/Moves/Breeding/EggSource.cs @@ -3,61 +3,97 @@ namespace PKHeX.Core { + /// + /// Egg Moveset Building Order for Generation 2 + /// public enum EggSource2 : byte { None, + /// Initial moveset for the egg's level. Base, + /// Egg move inherited from the Father. FatherEgg, + /// Technical Machine move inherited from the Father. FatherTM, + /// Level Up move inherited from a parent. ParentLevelUp, + /// Tutor move (Elemental Beam) inherited from a parent. Tutor, Max, } + /// + /// Egg Moveset Building Order for Generation 3 & 4 + /// public enum EggSource34 : byte { None, + /// Initial moveset for the egg's level. Base, + /// Egg move inherited from the Father. FatherEgg, + /// Technical Machine move inherited from the Father. FatherTM, + /// Level Up move inherited from a parent. ParentLevelUp, Max, + /// Special Move applied at the end if certain conditions are satisfied. VoltTackle, } + /// + /// Egg Moveset Building Order for Generation 5 + /// public enum EggSource5 : byte { None, + /// Initial moveset for the egg's level. Base, + /// Egg move inherited from the Father. FatherEgg, + /// Technical Machine move inherited from the Father. ParentLevelUp, - FatherTM, // after level up, unlike Gen3/4! + /// Technical Machine move inherited from the Father. + /// After level up, unlike Gen3/4! + FatherTM, Max, + /// Special Move applied at the end if certain conditions are satisfied. VoltTackle, } + /// + /// Egg Moveset Building Order for Generation 6+ + /// public enum EggSource6 : byte { None, + /// Initial moveset for the egg's level. Base, + /// Level Up move inherited from a parent. ParentLevelUp, + /// Egg move inherited from a parent. ParentEgg, Max, + /// Special Move applied at the end if certain conditions are satisfied. VoltTackle, } + /// + /// Utility logic for converting a move result into a user friendly string. + /// public static class EggSourceUtil { -#pragma warning disable RCS1224 // Make method an extension method. - public static string GetSource(object parse, int gen, int index) -#pragma warning restore RCS1224 // Make method an extension method. + /// + /// Unboxes the parse result and returns a user friendly string for the move result. + /// + public static string GetSource(object parse, int generation, int index) { static string GetLine(T[] arr, Func act, int i) { @@ -66,7 +102,7 @@ static string GetLine(T[] arr, Func act, int i) return act(arr[i]); } - return gen switch + return generation switch { 2 => GetLine((EggSource2[]) parse, GetSource, index), 3 or 4 => GetLine((EggSource34[])parse, GetSource, index), diff --git a/PKHeX.Core/Saves/Storage/PKMImportSetting.cs b/PKHeX.Core/Saves/Storage/PKMImportSetting.cs index 184f9b6a2..050f5ad87 100644 --- a/PKHeX.Core/Saves/Storage/PKMImportSetting.cs +++ b/PKHeX.Core/Saves/Storage/PKMImportSetting.cs @@ -1,9 +1,23 @@ namespace PKHeX.Core { + /// + /// Setting to conditionally update PKM properties when importing to a save file. + /// public enum PKMImportSetting { + /// + /// Use whatever the global setting is. + /// UseDefault, + + /// + /// Always update the PKM properties to match the save file. + /// Update, + + /// + /// Never update the PKM properties to match the save file. + /// Skip, } -} \ No newline at end of file +} diff --git a/PKHeX.Core/Saves/Storage/StorageSlotFlag.cs b/PKHeX.Core/Saves/Storage/StorageSlotFlag.cs index 3aaa89955..ccc8eae37 100644 --- a/PKHeX.Core/Saves/Storage/StorageSlotFlag.cs +++ b/PKHeX.Core/Saves/Storage/StorageSlotFlag.cs @@ -5,7 +5,7 @@ namespace PKHeX.Core /// /// Flags describing special attributes for a based on its origin from the parent . /// - /// If , then it's a nonspecial slot. + /// If , then it's not a special slot. [Flags] public enum StorageSlotFlag {