- Temporarily reintroduced the processing of !fromSheet (only in its inverted form) to fix M15 and CNS booster generation without breaking KTK/DGM booster generation (until a better solution is introduced).

This commit is contained in:
Agetian
2015-01-24 05:28:05 +00:00
parent f21ce140b7
commit e9000fa6b7

View File

@@ -188,6 +188,14 @@ public class BoosterGenerator {
operator = StringUtils.strip(operator.substring(4), "() "); operator = StringUtils.strip(operator.substring(4), "() ");
String[] cardNames = TextUtil.splitWithParenthesis(operator, ',', '"', '"'); String[] cardNames = TextUtil.splitWithParenthesis(operator, ',', '"', '"');
toAdd = IPaperCard.Predicates.names(Lists.newArrayList(cardNames)); toAdd = IPaperCard.Predicates.names(Lists.newArrayList(cardNames));
} else if (operator.startsWith("fromSheet(") && invert) {
String sheetName = StringUtils.strip(operator.substring(9), "()\" ");
Iterable<PaperCard> src = StaticData.instance().getPrintSheets().get(sheetName).toFlatList();
ArrayList<String> cardNames = Lists.newArrayList();
for (PaperCard card : src) {
cardNames.add(card.getName());
}
toAdd = IPaperCard.Predicates.names(Lists.newArrayList(cardNames));
} }
if(toAdd == null) if(toAdd == null)