PKHeX/PKHeX.Core/Editing/LocationEdits.cs

22 lines
623 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 ushort GetNoneLocation(PKM pk) => GetNoneLocation(pk.Context);
2022-08-21 08:39:16 +00:00
/// <summary>
/// Gets the "None" location index for a specific <see cref="PKM"/> context.
/// </summary>
public static ushort GetNoneLocation(EntityContext context) => context switch
{
2022-08-21 08:39:16 +00:00
EntityContext.Gen8b => Locations.Default8bNone,
_ => 0,
};
}