mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +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)
|
private void VerifyNoMarksPresent(LegalityAnalysis data, IRibbonIndex m)
|
||||||
{
|
{
|
||||||
if (m.HasMark(out var x))
|
for (var x = RibbonIndex.MarkLunchtime; x <= RibbonIndex.MarkSlump; x++)
|
||||||
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
|
{
|
||||||
|
if (m.GetRibbon((int)x))
|
||||||
|
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VerifyMarksPresent(LegalityAnalysis data, IRibbonIndex m)
|
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 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 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…
Add table
Reference in a new issue