Merge branch 'customCards_Folder' into 'master'

Support loading Custom Cards & Editions from User Folder

See merge request core-developers/forge!4222
This commit is contained in:
Anthony Calosa
2021-03-20 07:28:26 +00:00
6 changed files with 75 additions and 8 deletions

View File

@@ -29,7 +29,8 @@ public class CardDatabaseHelper {
private static void initialize() {
final CardStorageReader reader = new CardStorageReader(ForgeConstants.CARD_DATA_DIR, null, FModel.getPreferences().getPrefBoolean(FPref.LOAD_CARD_SCRIPTS_LAZILY));
staticData = new StaticData(reader, ForgeConstants.EDITIONS_DIR, ForgeConstants.BLOCK_DATA_DIR, FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_UNKNOWN_CARDS), FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_NONLEGAL_CARDS));
final CardStorageReader customReader = new CardStorageReader(ForgeConstants.USER_CUSTOM_CARDS_DIR, null, FModel.getPreferences().getPrefBoolean(FPref.LOAD_CARD_SCRIPTS_LAZILY));
staticData = new StaticData(reader, customReader, ForgeConstants.EDITIONS_DIR, ForgeConstants.USER_CUSTOM_EDITIONS_DIR ,ForgeConstants.BLOCK_DATA_DIR, FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_UNKNOWN_CARDS), FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_NONLEGAL_CARDS));
}
private static boolean hasBeenInitialized() {