mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 08:10:48 -05:00
Flag cross-transfer presence if tracker missing
Can't get a Pioneer Ribbon on SW/SH alolan vulpix lacking a HOME Tracker, assuming you have the HOME Tracker setting enabled.
This commit is contained in:
parent
912023d756
commit
136f742299
|
|
@ -37,14 +37,38 @@ public bool Append(PKM pk, EvolutionHistory history, ref ReadOnlySpan<EvoCriteri
|
|||
// Block BD/SP transfers that are impossible
|
||||
BlockBDSP(history, enc);
|
||||
|
||||
if (!pk.IsUntraded)
|
||||
if (!pk.IsUntraded && !(ParseSettings.IgnoreTransferIfNoTracker && pk is IHomeTrack { Tracker: 0 }))
|
||||
{
|
||||
CrossPropagate(history);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeleteAdjacent(pk, history);
|
||||
|
||||
if (!HasVisited(history))
|
||||
return false;
|
||||
}
|
||||
|
||||
chain = GetMaxChain(history);
|
||||
|
||||
return chain.Length != 0;
|
||||
}
|
||||
|
||||
private static bool HasVisited(EvolutionHistory history)
|
||||
{
|
||||
return history.Gen8.Length != 0 || history.Gen8a.Length != 0 || history.Gen8b.Length != 0;
|
||||
}
|
||||
|
||||
private static void DeleteAdjacent(PKM pk, EvolutionHistory history)
|
||||
{
|
||||
if (pk is not PK8)
|
||||
history.Gen8 = Array.Empty<EvoCriteria>();
|
||||
if (pk is not PA8)
|
||||
history.Gen8a = Array.Empty<EvoCriteria>();
|
||||
if (pk is not PB8)
|
||||
history.Gen8b = Array.Empty<EvoCriteria>();
|
||||
}
|
||||
|
||||
private static void BlockBDSP(EvolutionHistory history, EvolutionOrigin enc)
|
||||
{
|
||||
var bdsp = history.Gen8b;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace PKHeX.Core;
|
|||
// ReSharper disable once NotAccessedPositionalProperty.Global
|
||||
public sealed record CheckResult(Severity Judgement, string Comment, CheckIdentifier Identifier)
|
||||
{
|
||||
public bool Valid => Judgement >= Severity.Fishy;
|
||||
public bool Valid => Judgement != Severity.Invalid;
|
||||
public string Rating => Judgement.Description();
|
||||
|
||||
internal CheckResult(CheckIdentifier i) : this(Severity.Valid, LegalityCheckStrings.L_AValid, i) { }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
|
@ -87,6 +87,8 @@ public static bool InitFromSaveFileData(SaveFile sav)
|
|||
};
|
||||
}
|
||||
|
||||
internal static bool IgnoreTransferIfNoTracker => Gen8TransferTrackerNotPresent == Severity.Invalid;
|
||||
|
||||
public static void InitFromSettings(IParseSettings settings)
|
||||
{
|
||||
CheckWordFilter = settings.CheckWordFilter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user