mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
3c232505e5
In this pull request I've changed a ton of method signatures to reflect the more-narrow types of Species, Move# and Form; additionally, I've narrowed other large collections that stored lists of species / permitted values, and reworked them to be more performant with the latest API spaghetti that PKHeX provides. Roamer met locations, usually in a range of [max-min]<64, can be quickly checked using a bitflag operation on a UInt64. Other collections (like "Is this from Colosseum or XD") were eliminated -- shadow state is not transferred COLO<->XD, so having a Shadow ID or matching the met location from a gift/wild encounter is a sufficient check for "originated in XD".
28 lines
1 KiB
C#
28 lines
1 KiB
C#
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(ushort species, byte 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, ushort 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);
|
|
}
|