mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Fixed folder format loading to ensure core sets load first (otherwise android may not load standard correctly)
This commit is contained in:
@@ -166,12 +166,10 @@ 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(formats == null){
|
||||
formats = new GameFormat.Collection(new GameFormat.Reader(file));
|
||||
}else{
|
||||
if (!file.getName().equals("coreformats.txt")){
|
||||
GameFormat.Collection additionalformats = new GameFormat.Collection(new GameFormat.Reader(file));
|
||||
for (GameFormat format:additionalformats) {
|
||||
formats.add(format);
|
||||
|
||||
Reference in New Issue
Block a user