mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-15 08:31:21 -05:00
Update documentation for techrecord flag methods
Allow an ienumerable of moves rather than a readonly list
This commit is contained in:
parent
d1e9bc3877
commit
d7657f948d
|
|
@ -567,8 +567,8 @@ public static void SetRecordFlags(this PKM pk, bool value, int max = 100)
|
|||
/// Sets the Technical Record flags for the <see cref="pk"/> based on the current moves.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="moves">Moves to set flags for (if applicable)</param>
|
||||
public static void SetRecordFlags(this PKM pk, IReadOnlyList<int> moves)
|
||||
/// <param name="moves">Moves to set flags for. If a move is not a Technical Record, it is skipped.</param>
|
||||
public static void SetRecordFlags(this PKM pk, IEnumerable<int> moves)
|
||||
{
|
||||
if (!(pk is PK8 pk8))
|
||||
return;
|
||||
|
|
@ -581,17 +581,17 @@ public static void SetRecordFlags(this PKM pk, IReadOnlyList<int> moves)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets all the Technical Record flags for the <see cref="pk"/>.
|
||||
/// Sets all the Technical Record flags for the <see cref="pk"/> if they are permitted to be learned in-game.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user