mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Add more parse settings
allows consumers to tweak debatable settings
This commit is contained in:
parent
66faa43e03
commit
dc839333b7
3 changed files with 11 additions and 12 deletions
|
@ -47,7 +47,7 @@ namespace PKHeX.Core
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!info.FrameMatches && info.EncounterMatch is EncounterSlot && pkm.Version != (int)GameVersion.CXD) // if false, all valid RNG frame matches have already been consumed
|
if (!info.FrameMatches && info.EncounterMatch is EncounterSlot && pkm.Version != (int)GameVersion.CXD) // if false, all valid RNG frame matches have already been consumed
|
||||||
info.Parse.Add(new CheckResult(Severity.Fishy, LEncConditionBadRNGFrame, CheckIdentifier.PID)); // todo for further confirmation
|
info.Parse.Add(new CheckResult(ParseSettings.RNGFrameNotFound, LEncConditionBadRNGFrame, CheckIdentifier.PID)); // todo for further confirmation
|
||||||
if (!info.PIDIVMatches) // if false, all valid PIDIV matches have already been consumed
|
if (!info.PIDIVMatches) // if false, all valid PIDIV matches have already been consumed
|
||||||
info.Parse.Add(new CheckResult(Severity.Invalid, LPIDTypeMismatch, CheckIdentifier.PID));
|
info.Parse.Add(new CheckResult(Severity.Invalid, LPIDTypeMismatch, CheckIdentifier.PID));
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace PKHeX.Core
|
||||||
else if (EncounterMatch is MysteryGift m)
|
else if (EncounterMatch is MysteryGift m)
|
||||||
{
|
{
|
||||||
if (pkm.IsNicknamed && !m.IsEgg)
|
if (pkm.IsNicknamed && !m.IsEgg)
|
||||||
data.AddLine(Get(LEncGiftNicknamed, Severity.Fishy));
|
data.AddLine(Get(LEncGiftNicknamed, ParseSettings.NicknamedMysteryGift));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EncounterMatch is EncounterTrade)
|
if (EncounterMatch is EncounterTrade)
|
||||||
|
@ -409,10 +409,11 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
var pkm = data.pkm;
|
var pkm = data.pkm;
|
||||||
var EncounterMatch = data.EncounterOriginal;
|
var EncounterMatch = data.EncounterOriginal;
|
||||||
if (!IsNicknameMatch(nick, pkm, EncounterMatch)) // trades that are not nicknamed (but are present in a table with others being named)
|
// trades that are not nicknamed (but are present in a table with others being named)
|
||||||
data.AddLine(GetInvalid(LEncTradeChangedNickname, CheckIdentifier.Nickname));
|
var result = IsNicknameMatch(nick, pkm, EncounterMatch)
|
||||||
else
|
? GetValid(LEncTradeUnchanged, CheckIdentifier.Nickname)
|
||||||
data.AddLine(GetValid(LEncTradeUnchanged, CheckIdentifier.Nickname));
|
: Get(LEncTradeChangedNickname, ParseSettings.NicknamedTrade, CheckIdentifier.Nickname);
|
||||||
|
data.AddLine(result);
|
||||||
|
|
||||||
if (OT != pkm.OT_Name)
|
if (OT != pkm.OT_Name)
|
||||||
data.AddLine(GetInvalid(LEncTradeChangedOT, CheckIdentifier.Trainer));
|
data.AddLine(GetInvalid(LEncTradeChangedOT, CheckIdentifier.Trainer));
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool AllowGen1Tradeback { get; set; }
|
public static bool AllowGen1Tradeback { get; set; }
|
||||||
|
|
||||||
|
public static Severity NicknamedTrade { get; set; } = Severity.Invalid;
|
||||||
|
public static Severity NicknamedMysteryGift { get; set; } = Severity.Fishy;
|
||||||
|
public static Severity RNGFrameNotFound { get; set; } = Severity.Fishy;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks to see if Crystal is available to visit/originate from.
|
/// Checks to see if Crystal is available to visit/originate from.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -42,12 +46,6 @@
|
||||||
/// <returns>True if Crystal data is allowed</returns>
|
/// <returns>True if Crystal data is allowed</returns>
|
||||||
public static bool AllowGen2MoveReminder(PKM pkm) => !pkm.Korean && AllowGBCartEra;
|
public static bool AllowGen2MoveReminder(PKM pkm) => !pkm.Korean && AllowGBCartEra;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Savegame is Japanese
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Useful for checking the origin of EBerry data.</remarks>
|
|
||||||
internal static bool SavegameJapanese => ActiveTrainer.Language == 1;
|
|
||||||
|
|
||||||
internal static bool IsFromActiveTrainer(PKM pkm) => ActiveTrainer.IsFromTrainer(pkm);
|
internal static bool IsFromActiveTrainer(PKM pkm) => ActiveTrainer.IsFromTrainer(pkm);
|
||||||
|
|
||||||
public static bool InitFromSaveFileData(SaveFile sav)
|
public static bool InitFromSaveFileData(SaveFile sav)
|
||||||
|
|
Loading…
Reference in a new issue