From 3b635be77f7fa825267a7183e408e9f2c8d694ab Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 22 May 2018 18:57:39 -0700 Subject: [PATCH] Flag nonparsed removed parsedvalid/invalid, unnecessary I guess --- PKHeX.Core/Legality/Analysis.cs | 2 -- PKHeX.WinForms/Subforms/SAV_Database.cs | 4 ++-- PKHeX.WinForms/Util/PKMUtil.cs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/PKHeX.Core/Legality/Analysis.cs b/PKHeX.Core/Legality/Analysis.cs index cf002ecba..df486ee5f 100644 --- a/PKHeX.Core/Legality/Analysis.cs +++ b/PKHeX.Core/Legality/Analysis.cs @@ -25,8 +25,6 @@ public partial class LegalityAnalysis public readonly bool Valid; private readonly PersonalInfo PersonalInfo; public LegalInfo Info { get; private set; } - public bool ParsedValid => Parsed && Valid; - public bool ParsedInvalid => Parsed && !Valid; public string Report(bool verbose = false) => verbose ? GetVerboseLegalityReport() : GetLegalityReport(); private IEnumerable AllSuggestedMoves { diff --git a/PKHeX.WinForms/Subforms/SAV_Database.cs b/PKHeX.WinForms/Subforms/SAV_Database.cs index db2c838ae..ce693e073 100644 --- a/PKHeX.WinForms/Subforms/SAV_Database.cs +++ b/PKHeX.WinForms/Subforms/SAV_Database.cs @@ -503,9 +503,9 @@ private IEnumerable SearchDatabase() slotSelected = -1; // reset the slot last viewed if (Menu_SearchLegal.Checked && !Menu_SearchIllegal.Checked) - res = res.Where(pk => new LegalityAnalysis(pk).ParsedValid); + res = res.Where(pk => new LegalityAnalysis(pk).Valid); if (!Menu_SearchLegal.Checked && Menu_SearchIllegal.Checked) - res = res.Where(pk => new LegalityAnalysis(pk).ParsedInvalid); + res = res.Where(pk => !new LegalityAnalysis(pk).Valid); if (RTB_Instructions.Lines.Any(line => line.Length > 0)) { diff --git a/PKHeX.WinForms/Util/PKMUtil.cs b/PKHeX.WinForms/Util/PKMUtil.cs index b404a7441..163c65403 100644 --- a/PKHeX.WinForms/Util/PKMUtil.cs +++ b/PKHeX.WinForms/Util/PKMUtil.cs @@ -159,7 +159,7 @@ private static Image GetSprite(PKM pkm, SaveFile SAV, int box, int slot, bool fl if (box >= 0) pkm.Box = box; var la = new LegalityAnalysis(pkm, SAV.Personal); - if (la.ParsedInvalid && pkm.Species != 0) + if (!la.Valid && pkm.Species != 0) sprite = ImageUtil.LayerImage(sprite, Resources.warn, 0, 14, 1); } if (inBox) // in box