Update ribbonset4 iteration

only enforce none from the only 4/5 set; there's 4 ribbons checked by
any which can be received later on.
#1250
This commit is contained in:
Kurt
2017-06-21 21:46:20 -07:00
parent 8e8d43d52f
commit 7a8ce986fa

View File

@@ -798,9 +798,11 @@ IEnumerable<string> getGapRibbons(IReadOnlyList<bool> bits, IReadOnlyList<string
if (pkm is IRibbonSetCommon4 s4)
{
bool inhabited45 = 4 <= gen && gen <= 5;
var iterate = inhabited45 ? GetRibbonMessage4Any(pkm, s4, gen) : GetRibbonMessageNone(s4.RibbonBits(), s4.RibbonNames());
foreach (var z in iterate)
yield return z;
IEnumerable<string> iterate = GetRibbonMessage4Any(pkm, s4, gen);
if (!inhabited45)
iterate = iterate.Concat(GetRibbonMessageNone(s4.RibbonBitsOnly(), s4.RibbonNamesOnly()));
foreach (var z in iterate)
yield return z;
}
if (pkm is IRibbonSetCommon6 s6)
{