Support Set lookup for J21 and other future sets.

Forge loads all files found on the setlookup folder.
Example J21.txt (J21 set code) contains a list of set codes (sorted from Newest to Oldest beforehand) to lookup for images on other sets.
This commit is contained in:
Anthony Calosa
2021-08-16 12:06:20 +08:00
parent dfd448a323
commit 3d322e47ee
6 changed files with 112 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ public final class ForgeConstants {
public static final String RES_DIR = ASSETS_DIR + "res" + PATH_SEPARATOR;
public static final String LISTS_DIR = RES_DIR + "lists" + PATH_SEPARATOR;
public static final String SETLOOKUP_DIR = RES_DIR + "setlookup" + PATH_SEPARATOR;
public static final String KEYWORD_LIST_FILE = LISTS_DIR + "NonStackingKWList.txt";
public static final String TYPE_LIST_FILE = LISTS_DIR + "TypeLists.txt";
public static final String PLANESWALKER_ACHIEVEMENT_LIST_FILE = LISTS_DIR + "planeswalker-achievements.txt";

View File

@@ -179,7 +179,7 @@ public final class FModel {
customReader = null;
}
magicDb = new StaticData(reader, tokenReader, customReader, ForgeConstants.EDITIONS_DIR,
ForgeConstants.USER_CUSTOM_EDITIONS_DIR, ForgeConstants.BLOCK_DATA_DIR,
ForgeConstants.USER_CUSTOM_EDITIONS_DIR, ForgeConstants.BLOCK_DATA_DIR, ForgeConstants.SETLOOKUP_DIR,
FModel.getPreferences().getPref(FPref.UI_PREFERRED_ART),
FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_UNKNOWN_CARDS),
FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_NONLEGAL_CARDS),