mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 00:07:15 +00:00
Move EReader berry names from tables to settings class
This commit is contained in:
parent
b7bb5a0672
commit
649958ee68
2 changed files with 34 additions and 33 deletions
|
@ -97,36 +97,6 @@ namespace PKHeX.Core
|
|||
|
||||
internal static readonly bool[] ReleasedHeldItems_3 = GetPermitList(MaxItemID_3, HeldItems_RS, new ushort[] {005}); // Safari Ball
|
||||
|
||||
internal static readonly HashSet<string> EReaderBerriesNames_USA = new()
|
||||
{
|
||||
// USA Series 1
|
||||
"PUMKIN",
|
||||
"DRASH",
|
||||
"EGGANT",
|
||||
"STRIB",
|
||||
"CHILAN",
|
||||
"NUTPEA",
|
||||
};
|
||||
|
||||
internal static readonly HashSet<string> EReaderBerriesNames_JP = new()
|
||||
{
|
||||
// JP Series 1
|
||||
"カチャ", // PUMKIN
|
||||
"ブ-カ", // DRASH
|
||||
"ビスナ", // EGGANT
|
||||
"エドマ", // STRIB
|
||||
"ホズ", // CHILAN
|
||||
"ラッカ", // NUTPEA
|
||||
"クオ", // KU
|
||||
// JP Series 2
|
||||
"ギネマ", // GINEMA
|
||||
"クオ", // KUO
|
||||
"ヤゴ", // YAGO
|
||||
"トウガ", // TOUGA
|
||||
"ニニク", // NINIKU
|
||||
"トポ" // TOPO
|
||||
};
|
||||
|
||||
internal static readonly int[] TM_3 =
|
||||
{
|
||||
264, 337, 352, 347, 046, 092, 258, 339, 331, 237,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using static PKHeX.Core.EReaderBerryMatch;
|
||||
using System.Collections.Generic;
|
||||
using static PKHeX.Core.EReaderBerryMatch;
|
||||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
|
@ -23,7 +24,7 @@ namespace PKHeX.Core
|
|||
if (IsEnigma) // no e-Reader Berry data provided, can't hold berry.
|
||||
return NoData;
|
||||
|
||||
var matchUSA = Legal.EReaderBerriesNames_USA.Contains(Name);
|
||||
var matchUSA = EReaderBerriesNames_USA.Contains(Name);
|
||||
if (matchUSA)
|
||||
{
|
||||
if (Language <= 0)
|
||||
|
@ -33,7 +34,7 @@ namespace PKHeX.Core
|
|||
return InvalidUSA;
|
||||
}
|
||||
|
||||
var matchJP = Legal.EReaderBerriesNames_JP.Contains(Name);
|
||||
var matchJP = EReaderBerriesNames_JP.Contains(Name);
|
||||
if (matchJP)
|
||||
{
|
||||
if (Language <= 0)
|
||||
|
@ -46,6 +47,36 @@ namespace PKHeX.Core
|
|||
return NoMatch;
|
||||
}
|
||||
|
||||
private static readonly HashSet<string> EReaderBerriesNames_USA = new()
|
||||
{
|
||||
// USA Series 1
|
||||
"PUMKIN",
|
||||
"DRASH",
|
||||
"EGGANT",
|
||||
"STRIB",
|
||||
"CHILAN",
|
||||
"NUTPEA",
|
||||
};
|
||||
|
||||
private static readonly HashSet<string> EReaderBerriesNames_JP = new()
|
||||
{
|
||||
// JP Series 1
|
||||
"カチャ", // PUMKIN
|
||||
"ブ-カ", // DRASH
|
||||
"ビスナ", // EGGANT
|
||||
"エドマ", // STRIB
|
||||
"ホズ", // CHILAN
|
||||
"ラッカ", // NUTPEA
|
||||
"クオ", // KU
|
||||
// JP Series 2
|
||||
"ギネマ", // GINEMA
|
||||
"クオ", // KUO
|
||||
"ヤゴ", // YAGO
|
||||
"トウガ", // TOUGA
|
||||
"ニニク", // NINIKU
|
||||
"トポ" // TOPO
|
||||
};
|
||||
|
||||
public static void LoadFrom(SAV3 sav3)
|
||||
{
|
||||
IsEnigma = sav3.IsEBerryIsEnigma;
|
||||
|
|
Loading…
Reference in a new issue