mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Moved formats into single files with new "Order", "Core" and "Name" properties.
This commit is contained in:
@@ -166,21 +166,7 @@ public final class FModel {
|
||||
ForgePreferences.DEV_MODE = preferences.getPrefBoolean(FPref.DEV_MODE_ENABLED);
|
||||
ForgePreferences.UPLOAD_DRAFT = ForgePreferences.NET_CONN;
|
||||
|
||||
formats = new GameFormat.Collection(new GameFormat.Reader( new File(ForgeConstants.FORMATS_DATA_DIR + "coreformats.txt")));
|
||||
final File[] files = new File(ForgeConstants.FORMATS_DATA_DIR).listFiles();
|
||||
for (final File file : files) {
|
||||
if (!file.getName().equals("coreformats.txt")){
|
||||
GameFormat.Collection additionalformats = new GameFormat.Collection(new GameFormat.Reader(file));
|
||||
for (GameFormat format:additionalformats) {
|
||||
formats.add(format);
|
||||
}
|
||||
}
|
||||
}
|
||||
//still support old user custom formats if file present
|
||||
GameFormat.Collection customFormats = new GameFormat.Collection(new GameFormat.Reader(new File(ForgeConstants.USER_PREFS_DIR + "customformats.txt")));
|
||||
for (GameFormat format:customFormats){
|
||||
formats.add(format);
|
||||
}
|
||||
formats = new GameFormat.Collection(new GameFormat.Reader( new File(ForgeConstants.FORMATS_DATA_DIR)));
|
||||
|
||||
magicDb.setStandardPredicate(formats.getStandard().getFilterRules());
|
||||
magicDb.setModernPredicate(formats.getModern().getFilterRules());
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class GameFormatQuest extends GameFormat {
|
||||
*/
|
||||
public GameFormatQuest(final GameFormat toCopy, boolean allowSetUnlocks) {
|
||||
super(toCopy.getName(), toCopy.getAllowedSetCodes(), toCopy.getBannedCardNames(), toCopy.getRestrictedCards(),
|
||||
toCopy.getAllowedRarities(), toCopy.getIndex());
|
||||
toCopy.getAllowedRarities(), toCopy.getIndex(), false);
|
||||
allowUnlocks = allowSetUnlocks;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user