mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Error check on invalid legality
Check fails -> flag instead of error.
This commit is contained in:
parent
8a8926bcca
commit
053657c3be
1 changed files with 9 additions and 5 deletions
|
@ -26,10 +26,14 @@ namespace PKHeX
|
|||
if (!(pk is PK6))
|
||||
return;
|
||||
pk6 = pk as PK6;
|
||||
updateRelearnLegality();
|
||||
updateMoveLegality();
|
||||
updateChecks();
|
||||
getLegalityReport();
|
||||
try
|
||||
{
|
||||
updateRelearnLegality();
|
||||
updateMoveLegality();
|
||||
updateChecks();
|
||||
getLegalityReport();
|
||||
}
|
||||
catch { Valid = false; }
|
||||
}
|
||||
|
||||
public void updateRelearnLegality()
|
||||
|
@ -109,7 +113,7 @@ namespace PKHeX
|
|||
r += Environment.NewLine;
|
||||
|
||||
var chks = Checks;
|
||||
r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top
|
||||
r += chks.Where(chk => chk != null && chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top
|
||||
.Aggregate("", (current, chk) => current + $"{chk.Judgement}: {chk.Comment}{Environment.NewLine}");
|
||||
return r.TrimEnd();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue