mirror of
https://github.com/kwsch/PKHeX
synced 2025-01-07 18:18:47 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
34 lines
1 KiB
C#
34 lines
1 KiB
C#
namespace PKHeX.Core;
|
|
|
|
public interface IRegionOrigin
|
|
{
|
|
/// <summary> Console hardware region. </summary>
|
|
/// <see cref="Region3DSIndex"/>
|
|
byte ConsoleRegion { get; set; }
|
|
/// <summary> Console's configured Country via System Settings. </summary>
|
|
byte Country { get; set; }
|
|
/// <summary> Console's configured Region within <see cref="Country"/> via System Settings. </summary>
|
|
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;
|
|
}
|
|
}
|