mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-22 10:23:09 +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`
35 lines
No EOL
1.2 KiB
C#
35 lines
No EOL
1.2 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Encounter data from <see cref="GameVersion.GO"/>, which has multiple generations of origin.
|
|
/// </summary>
|
|
#if !DEBUG
|
|
internal static class EncountersGO
|
|
{
|
|
internal const int MAX_LEVEL = 50;
|
|
|
|
internal static readonly EncounterArea7g[] SlotsGO_GG = EncounterArea7g.GetArea(EncounterUtil.Get("go_lgpe", "go"));
|
|
internal static readonly EncounterArea8g[] SlotsGO = EncounterArea8g.GetArea(EncounterUtil.Get("go_home", "go"));
|
|
}
|
|
#else
|
|
public static class EncountersGO
|
|
{
|
|
internal const int MAX_LEVEL = 50;
|
|
|
|
internal static EncounterArea7g[] SlotsGO_GG = EncounterArea7g.GetArea(Get("go_lgpe", "go"));
|
|
internal static EncounterArea8g[] SlotsGO = EncounterArea8g.GetArea(Get("go_home", "go"));
|
|
|
|
public static void Reload()
|
|
{
|
|
SlotsGO_GG = EncounterArea7g.GetArea(Get("go_lgpe", "go"));
|
|
SlotsGO = EncounterArea8g.GetArea(Get("go_home", "go"));
|
|
}
|
|
|
|
private static BinLinkerAccessor Get(string resource, string ident)
|
|
{
|
|
var name = $"encounter_{resource}.pkl";
|
|
var data = System.IO.File.Exists(name) ? System.IO.File.ReadAllBytes(name) : Util.GetBinaryResource(name);
|
|
return BinLinkerAccessor.Get(data, ident);
|
|
}
|
|
}
|
|
#endif |