mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 18:25:47 -05:00
Add overload for ITrainerInfo blank fetch
This commit is contained in:
@@ -30,8 +30,20 @@ public static PKM GetBlank(Type type)
|
||||
_ => GetBlank(gen),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Blank <see cref="PKM"/> object compatible with the provided inputs.
|
||||
/// </summary>
|
||||
public static PKM GetBlank(ITrainerInfo tr)
|
||||
{
|
||||
if (tr is SaveFile s)
|
||||
return s.BlankPKM;
|
||||
return GetBlank(tr.Generation, tr.Game);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="GetBlank(ITrainerInfo)"/>
|
||||
public static PKM GetBlank(int gen, int ver) => GetBlank(gen, (GameVersion)ver);
|
||||
|
||||
/// <inheritdoc cref="GetBlank(ITrainerInfo)"/>
|
||||
public static PKM GetBlank(int gen)
|
||||
{
|
||||
var type = Type.GetType($"PKHeX.Core.PK{gen}");
|
||||
|
||||
Reference in New Issue
Block a user