namespace PKHeX.Core
{
public interface IRegionOrigin
{
/// Console hardware region.
///
byte ConsoleRegion { get; set; }
/// Console's configured Country via System Settings.
byte Country { get; set; }
/// Console's configured Region within via System Settings.
byte Region { get; set; }
}
public static partial class Extensions
{
public static void SetDefaultRegionOrigins(this IRegionOrigin o)
{
o.ConsoleRegion = 1; // North America
o.Region = 7; // California
o.Country = 49; // USA
}
public static void CopyRegionOrigin(this IRegionOrigin source, IRegionOrigin dest)
{
dest.ConsoleRegion = source.ConsoleRegion;
dest.Country = source.Country;
dest.Region = source.Region;
}
public static void ClearRegionOrigin(this IRegionOrigin o)
{
o.ConsoleRegion = o.Region = o.Country = 0;
}
}
}