PKHeX/PKHeX.Core/Legality/Structures/CheckResult.cs
Kurt 136f742299 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.
2022-08-16 15:50:35 -07:00

16 lines
635 B
C#

namespace PKHeX.Core;
/// <summary>
/// Result of a Legality Check
/// </summary>
[System.Diagnostics.DebuggerDisplay($"{{{nameof(Identifier)}}}: {{{nameof(Comment)}}}")]
// ReSharper disable once NotAccessedPositionalProperty.Global
public sealed record CheckResult(Severity Judgement, string Comment, CheckIdentifier Identifier)
{
public bool Valid => Judgement != Severity.Invalid;
public string Rating => Judgement.Description();
internal CheckResult(CheckIdentifier i) : this(Severity.Valid, LegalityCheckStrings.L_AValid, i) { }
public string Format(string format) => string.Format(format, Rating, Comment);
}