Skip to content

Commit

Permalink
some xml documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
architdate committed Feb 8, 2021
1 parent a33ccc7 commit 08900d5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions PKHeX.Core.AutoMod/AutoMod/APILegality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ private static void HandleEggEncounters(this PKM pk, IEncounterable enc, ITraine
pk.Egg_Location = Locations.TradedEggLocation(pk.Generation);
}

/// <summary>
/// Sets a tracker based on the setting provided
/// </summary>
/// <param name="pk">pk to set the tracker for</param>
private static void GetSuggestedTracker(this PKM pk)
{
if (pk is not IHomeTrack home)
Expand Down Expand Up @@ -540,6 +544,12 @@ private static void SetIVsPID(this PKM pk, IBattleTemplate set, PIDType method,
}
}

/// <summary>
/// Set PIDIV for raid PKM via XOROSHIRO incase it is transferred to future generations to preserve the IVs
/// </summary>
/// <param name="pk">Pokemon to be edited</param>
/// <param name="enc">Raid encounter encounterable</param>
/// <param name="set">Set to pass in requested IVs</param>
private static void PreSetPIDIV(this PKM pk, IEncounterable enc, IBattleTemplate set)
{
if (enc is EncounterStatic8N or EncounterStatic8NC or EncounterStatic8ND or EncounterStatic8U)
Expand Down Expand Up @@ -614,6 +624,13 @@ private static void FindNestPIDIV<T>(PK8 pk, T enc, bool shiny) where T : Encoun
pk.StatNature = iterPKM.StatNature;
}

/// <summary>
/// Exit Criteria for IVs to be valid
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="pk">Pokemon to edit</param>
/// <param name="template">Clone of the PKM taken prior</param>
/// <returns>True if the IVs are matching the criteria</returns>
private static bool IsMatchCriteria<T>(PK8 pk, PKM template) where T : EncounterStatic8Nest<T>
{
if (template.Nature != pk.Nature) // match nature
Expand Down Expand Up @@ -837,6 +854,9 @@ AsyncLegalizationResult GetLegal()
return result.Created;
}

/// <summary>
/// Async Related actions for global timer.
/// </summary>
private class AsyncLegalizationResult
{
public readonly PKM Created;
Expand Down

0 comments on commit 08900d5

Please sign in to comment.