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>
|
|
|
|
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-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,
|
|
|
|
};
|
|
|
|
}
|