Net decks updates

This commit is contained in:
paul_snoops
2021-06-10 20:09:40 +01:00
parent f1169511ab
commit df0b5362c2
7 changed files with 122 additions and 49 deletions

View File

@@ -21,7 +21,7 @@ import forge.util.storage.StorageBase;
public class NetDeckCategory extends StorageBase<Deck> {
public static final String PREFIX = "NET_DECK_";
private static Map<String, NetDeckCategory> constructed, commander, brawl;
private static Map<String, NetDeckCategory> constructed, commander, brawl, oathbreaker, tinyleaders;
private static Map<String, NetDeckCategory> loadCategories(String filename) {
Map<String, NetDeckCategory> categories = new TreeMap<>();
@@ -64,6 +64,18 @@ public class NetDeckCategory extends StorageBase<Deck> {
}
categories = brawl;
break;
case Oathbreaker:
if (oathbreaker == null) {
oathbreaker = loadCategories(ForgeConstants.NET_DECKS_OATHBREAKER_LIST_FILE);
}
categories = oathbreaker;
break;
case TinyLeaders:
if (tinyleaders == null) {
tinyleaders = loadCategories(ForgeConstants.NET_DECKS_TINYLEADERS_LIST_FILE);
}
categories = tinyleaders;
break;
default:
return null;
}

View File

@@ -48,6 +48,8 @@ public final class ForgeConstants {
public static final String NET_DECKS_LIST_FILE = LISTS_DIR + "net-decks.txt";
public static final String NET_DECKS_COMMANDER_LIST_FILE = LISTS_DIR + "net-decks-commander.txt";
public static final String NET_DECKS_BRAWL_LIST_FILE = LISTS_DIR + "net-decks-brawl.txt";
public static final String NET_DECKS_OATHBREAKER_LIST_FILE = LISTS_DIR + "net-decks-oathbreaker.txt";
public static final String NET_DECKS_TINYLEADERS_LIST_FILE = LISTS_DIR + "net-decks-tinyleaders.txt";
public static final String BORDERLESS_CARD_LIST_FILE = LISTS_DIR + "borderlessCardList.txt";
public static final String SKINS_LIST_FILE = LISTS_DIR + "skinsList.txt";
public static final String CJK_FONTS_LIST_FILE = LISTS_DIR + "font-list.txt";