From d7657f948dbe4ae5e448bf8bb718ffc986448de5 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 16 Nov 2019 08:18:57 -0800 Subject: [PATCH] Update documentation for techrecord flag methods Allow an ienumerable of moves rather than a readonly list --- PKHeX.Core/Editing/CommonEdits.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Editing/CommonEdits.cs b/PKHeX.Core/Editing/CommonEdits.cs index 137929f2d..11e99c4b1 100644 --- a/PKHeX.Core/Editing/CommonEdits.cs +++ b/PKHeX.Core/Editing/CommonEdits.cs @@ -567,8 +567,8 @@ public static void SetRecordFlags(this PKM pk, bool value, int max = 100) /// Sets the Technical Record flags for the based on the current moves. /// /// Pokémon to modify. - /// Moves to set flags for (if applicable) - public static void SetRecordFlags(this PKM pk, IReadOnlyList moves) + /// Moves to set flags for. If a move is not a Technical Record, it is skipped. + public static void SetRecordFlags(this PKM pk, IEnumerable moves) { if (!(pk is PK8 pk8)) return; @@ -581,17 +581,17 @@ public static void SetRecordFlags(this PKM pk, IReadOnlyList moves) } /// - /// Sets all the Technical Record flags for the . + /// Sets all the Technical Record flags for the if they are permitted to be learned in-game. /// /// Pokémon to modify. public static void SetRecordFlags(this PKM pk) { if (!(pk is PK8 pk8)) return; - var pi = pk8.PersonalInfo.TMHM; - for (int i = 100; i < pi.Length; i++) + var permit = pk8.PersonalInfo.TMHM; + for (int i = 100; i < permit.Length; i++) { - if (pi[i]) + if (permit[i]) pk8.SetMoveRecordFlag(i - 100, true); } }