2022-08-21 08:39:16 +00:00
|
|
|
namespace PKHeX.Core;
|
2022-05-31 04:43:52 +00:00
|
|
|
|
2022-08-21 08:39:16 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Logic for locations of a <see cref="PKM"/>.
|
|
|
|
/// </summary>
|
2022-05-31 04:43:52 +00:00
|
|
|
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>
|
2024-02-23 03:20:54 +00:00
|
|
|
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>
|
2024-02-23 03:20:54 +00:00
|
|
|
public static ushort GetNoneLocation(EntityContext context) => context switch
|
2022-05-31 04:43:52 +00:00
|
|
|
{
|
2022-08-21 08:39:16 +00:00
|
|
|
EntityContext.Gen8b => Locations.Default8bNone,
|
2022-05-31 04:43:52 +00:00
|
|
|
_ => 0,
|
|
|
|
};
|
|
|
|
}
|