PKHeX/PKHeX.Core/Editing/LocationEdits.cs

22 lines
617 B
C#
Raw Normal View History

2022-08-21 08:39:16 +00:00
namespace PKHeX.Core;
2022-08-21 08:39:16 +00:00
/// <summary>
/// Logic for locations of a <see cref="PKM"/>.
/// </summary>
public static class LocationEdits
{
2022-08-21 08:39:16 +00:00
/// <summary>
/// Gets the "None" location index for a specific <see cref="PKM"/> context.
/// </summary>
public static int GetNoneLocation(PKM pk) => GetNoneLocation(pk.Context);
/// <summary>
/// Gets the "None" location index for a specific <see cref="PKM"/> context.
/// </summary>
public static int GetNoneLocation(EntityContext context) => context switch
{
2022-08-21 08:39:16 +00:00
EntityContext.Gen8b => Locations.Default8bNone,
_ => 0,
};
}