mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Patch showing custom card warning properly
This commit is contained in:
@@ -338,12 +338,11 @@ public enum DeckFormat {
|
|||||||
// should group all cards by name, so that different editions of same card are really counted as the same card
|
// should group all cards by name, so that different editions of same card are really counted as the same card
|
||||||
for (final Entry<String, Integer> cp : Aggregates.groupSumBy(allCards, PaperCard.FN_GET_NAME)) {
|
for (final Entry<String, Integer> cp : Aggregates.groupSumBy(allCards, PaperCard.FN_GET_NAME)) {
|
||||||
IPaperCard simpleCard = StaticData.instance().getCommonCards().getCard(cp.getKey());
|
IPaperCard simpleCard = StaticData.instance().getCommonCards().getCard(cp.getKey());
|
||||||
if (simpleCard == null)
|
if (simpleCard == null) {
|
||||||
simpleCard = StaticData.instance().getCustomCards().getCard(cp.getKey());
|
simpleCard = StaticData.instance().getCustomCards().getCard(cp.getKey());
|
||||||
|
if (simpleCard != null && !StaticData.instance().isEnableCustomCardsInDecks())
|
||||||
if (simpleCard != null && !StaticData.instance().isEnableCustomCardsInDecks())
|
return TextUtil.concatWithSpace("contains a Custom Card:", cp.getKey(), "\nPlease Enable Custom Cards in Forge Preferences to use this deck.");
|
||||||
return TextUtil.concatWithSpace("contains a Custom Card:", cp.getKey(), "\nPlease Enable Custom Cards in Forge Preferences to use this deck.");
|
}
|
||||||
|
|
||||||
// Might cause issues since it ignores "Special" Cards
|
// Might cause issues since it ignores "Special" Cards
|
||||||
if (simpleCard == null) {
|
if (simpleCard == null) {
|
||||||
return TextUtil.concatWithSpace("contains the nonexisting card", cp.getKey());
|
return TextUtil.concatWithSpace("contains the nonexisting card", cp.getKey());
|
||||||
|
|||||||
Reference in New Issue
Block a user