mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
fix for decks with cards in development (that have no valid setinfo)
This commit is contained in:
@@ -105,9 +105,9 @@ public final class CardDb {
|
||||
String cardName = name;
|
||||
if (pipePos >= 0) {
|
||||
cardName = name.substring(0, pipePos);
|
||||
String setName = name.substring(pipePos + 1);
|
||||
String setName = name.substring(pipePos + 1).trim();
|
||||
// only if set is not blank try to load it
|
||||
if (StringUtils.isNotBlank(setName)) {
|
||||
if (StringUtils.isNotBlank(setName) && !"???".equals(setName)) {
|
||||
return getCard(cardName, setName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,7 +507,13 @@ public class DeckManager {
|
||||
List<Entry<CardPrinted, Integer>> main2sort = pool.getOrderedList();
|
||||
Collections.sort(main2sort, TableSorter.byNameThenSet);
|
||||
for (Entry<CardPrinted, Integer> e : main2sort) {
|
||||
out.write(format("%d %s|%s%n", e.getValue(), e.getKey().getName(), e.getKey().getSet()));
|
||||
CardPrinted card = e.getKey();
|
||||
boolean hasBadSetInfo = "???".equals(card.getSet()) || StringUtils.isBlank(card.getSet());
|
||||
if (hasBadSetInfo) {
|
||||
out.write(format("%d %s%n", e.getValue(), card.getName()));
|
||||
} else {
|
||||
out.write(format("%d %s|%s%n", e.getValue(), card.getName(), card.getSet()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user