Add more xmldoc

This commit is contained in:
Kurt 2022-08-11 00:46:41 -07:00
parent af87d038aa
commit 7c4e5e7b04
7 changed files with 45 additions and 5 deletions

View file

@ -1,14 +1,28 @@
namespace PKHeX.Core;
/// <summary>
/// Interface describing how to obtain a <see cref="T"/> from the implementer.
/// </summary>
/// <typeparam name="T">Type of sprite that can be generated.</typeparam>
public interface ISpriteBuilder<T>
{
/// <summary>
/// Gets a sprite using the requested parameters.
/// </summary>
T GetSprite(int species, int form, int gender, uint formarg, int heldItem, bool isEgg, Shiny shiny,
int generation = -1,
SpriteBuilderTweak tweak = SpriteBuilderTweak.None);
/// <summary>
/// Revises the sprite using the requested parameters.
/// </summary>
T GetSprite(T baseSprite, int species, int heldItem, bool isEgg, Shiny shiny,
int generation = -1,
SpriteBuilderTweak tweak = SpriteBuilderTweak.None);
/// <summary>
/// Initializes the implementation with the context details from the <see cref="sav"/>.
/// </summary>
/// <param name="sav">Save File context the sprites will be generated for</param>
void Initialize(SaveFile sav);
}

View file

@ -3,6 +3,9 @@ using System;
namespace PKHeX.Core;
using static LearnEnvironment;
/// <summary>
/// Indicates the group of game(s) that the move was learned in.
/// </summary>
public enum LearnEnvironment : byte
{
None,

View file

@ -3,6 +3,13 @@ using System.Text;
namespace PKHeX.Core;
/// <summary>
/// Stores parsed data about how a move was learned.
/// </summary>
/// <param name="Info">Info about the game it was learned in.</param>
/// <param name="EvoStage">Evolution stage index within the <see cref="MoveLearnInfo.Environment"/> evolution list it existed in.</param>
/// <param name="Generation">Rough indicator of generation the <see cref="MoveLearnInfo.Environment"/> was.</param>
/// <param name="Expect">Optional value used when the move is not legal, to indicate that another move ID should have been in that move slot instead.</param>
public readonly record struct MoveResult(MoveLearnInfo Info, byte EvoStage = 0, byte Generation = 0, short Expect = 0)
{
public bool IsParsed => this != default;

View file

@ -1,5 +1,8 @@
namespace PKHeX.Core;
/// <summary>
/// Option for checking how a move may be learned.
/// </summary>
public enum LearnOption
{
/// <summary>
@ -8,10 +11,12 @@ public enum LearnOption
Current,
/// <summary>
/// Checks with rules assuming the move was known while present in the game.
/// Checks with rules assuming the move was known at any time while existing inside the game source it is being checked in.
/// </summary>
/// <remarks>
/// Only relevant for memory checks. For not-transferable moves like Gen4/5 HM moves, no.
/// Only relevant for memory checks.
/// For not-transferable moves like Gen4/5 HM moves, no -- there's no point in checking them as they aren't requisites for anything.
/// Evolution criteria is handled separately.
/// </remarks>
AtAnyTime,
}

View file

@ -4,6 +4,14 @@ namespace PKHeX.Core;
internal static class LearnSource4
{
/// <summary>
/// Gets the preferred list of HM moves to disallow on transfer from <see cref="PK4"/> to <see cref="PK5"/>.
/// </summary>
/// <remarks>
/// If the moveset has Defog, then we prefer HG/SS (remove Whirlpool) over D/P/Pt.
/// Defog is a competitively viable move, while Whirlpool is not really useful.
/// </remarks>
/// <param name="hasDefog">True if the current moveset has <see cref="Move.Defog"/>.</param>
public static ReadOnlySpan<int> GetPreferredTransferHMs(bool hasDefog) => hasDefog ? HM_HGSS : HM_DPPt;
internal static readonly int[] SpecialTutors_4 =

View file

@ -2,10 +2,13 @@ using System;
namespace PKHeX.Core;
/// <summary>
/// Logic to check the possible moves a Pokémon can learn.
/// </summary>
public static class LearnPossible
{
/// <summary>
/// Populates a list of move indexes that can be learned based on the inputs.
/// Populates the permission <see cref="result"/> list indicating the move ID indexes that can be learned based on the inputs.
/// </summary>
/// <param name="pk">Entity to check</param>
/// <param name="enc">Encounter it has been matched to</param>

View file

@ -10,10 +10,10 @@ public sealed class LegalInfo : IGeneration
/// <summary>The <see cref="PKM"/> object used for comparisons.</summary>
public readonly PKM Entity;
/// <summary>The generation of games the <see cref="PKM"/> originated from.</summary>
/// <summary>The generation of games the <see cref="Entity"/> originated from.</summary>
public int Generation { get; private set; }
/// <summary>The matched Encounter details for the <see cref="PKM"/>. </summary>
/// <summary>The matched Encounter details for the <see cref="Entity"/>. </summary>
public IEncounterable EncounterMatch
{
get => _match;