mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
Flag all marks, unlike prior commit
oops, unnecessary simplification
This commit is contained in:
parent
acfbef6cfa
commit
68673cf671
2 changed files with 5 additions and 14 deletions
|
@ -25,8 +25,11 @@ namespace PKHeX.Core
|
|||
|
||||
private void VerifyNoMarksPresent(LegalityAnalysis data, IRibbonIndex m)
|
||||
{
|
||||
if (m.HasMark(out var x))
|
||||
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
|
||||
for (var x = RibbonIndex.MarkLunchtime; x <= RibbonIndex.MarkSlump; x++)
|
||||
{
|
||||
if (m.GetRibbon((int)x))
|
||||
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
|
||||
}
|
||||
}
|
||||
|
||||
private void VerifyMarksPresent(LegalityAnalysis data, IRibbonIndex m)
|
||||
|
|
|
@ -110,17 +110,5 @@
|
|||
{
|
||||
public static bool GetRibbonIndex(this IRibbonIndex x, RibbonIndex r) => x.GetRibbon((int)r);
|
||||
public static void SetRibbonIndex(this IRibbonIndex x, RibbonIndex r, bool value = true) => x.SetRibbon((int)r, value);
|
||||
|
||||
public static bool HasMark(this IRibbonIndex m, out RibbonIndex x)
|
||||
{
|
||||
for (x = RibbonIndex.MarkLunchtime; x <= RibbonIndex.MarkSlump; x++)
|
||||
{
|
||||
if (m.GetRibbon((int) x))
|
||||
return true;
|
||||
}
|
||||
|
||||
x = (RibbonIndex)0xFF;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue