mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
move default gauntlet files to defaults dir
This commit is contained in:
@@ -27,7 +27,6 @@ public final class GauntletData {
|
||||
|
||||
/** Constructor. */
|
||||
public GauntletData() {
|
||||
new File(GauntletIO.DIR_GAUNTLETS).mkdir();
|
||||
}
|
||||
|
||||
//========== Mutator / accessor methods
|
||||
|
||||
@@ -24,12 +24,11 @@ import forge.deck.CardPool;
|
||||
import forge.error.BugReporter;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.util.IgnoringXStream;
|
||||
|
||||
/** */
|
||||
public class GauntletIO {
|
||||
/** Directory for storing gauntlet data files. */
|
||||
public static final String DIR_GAUNTLETS = "res/gauntlet/";
|
||||
/** Prompt in text field for new (unsaved) built gauntlets. */
|
||||
public static final String TXF_PROMPT = "[New Gauntlet]";
|
||||
/** Prefix for quick gauntlet save files. */
|
||||
@@ -65,7 +64,7 @@ public class GauntletIO {
|
||||
}
|
||||
};
|
||||
|
||||
File folder = new File(GauntletIO.DIR_GAUNTLETS);
|
||||
File folder = new File(NewConstants.GAUNTLET_DIR.defaultLoc);
|
||||
return folder.listFiles(filter);
|
||||
}
|
||||
|
||||
@@ -79,7 +78,7 @@ public class GauntletIO {
|
||||
}
|
||||
};
|
||||
|
||||
File folder = new File(GauntletIO.DIR_GAUNTLETS);
|
||||
File folder = new File(NewConstants.GAUNTLET_DIR.defaultLoc);
|
||||
return folder.listFiles(filter);
|
||||
}
|
||||
|
||||
@@ -93,7 +92,7 @@ public class GauntletIO {
|
||||
}
|
||||
};
|
||||
|
||||
File folder = new File(GauntletIO.DIR_GAUNTLETS);
|
||||
File folder = new File(NewConstants.GAUNTLET_DIR.defaultLoc);
|
||||
return folder.listFiles(filter);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import forge.game.player.PlayerType;
|
||||
import forge.gauntlet.GauntletData;
|
||||
import forge.gauntlet.GauntletIO;
|
||||
import forge.gui.framework.ICDoc;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.quest.QuestController;
|
||||
import forge.quest.QuestEvent;
|
||||
import forge.util.storage.IStorage;
|
||||
@@ -47,7 +48,7 @@ public enum CSubmenuGauntletBuild implements ICDoc {
|
||||
private final VSubmenuGauntletBuild view = VSubmenuGauntletBuild.SINGLETON_INSTANCE;
|
||||
private final List<Deck> workingDecks = new ArrayList<Deck>();
|
||||
private File previousDirectory = null;
|
||||
private File openStartDir = new File(GauntletIO.DIR_GAUNTLETS);
|
||||
private File openStartDir = new File(NewConstants.GAUNTLET_DIR.defaultLoc);
|
||||
|
||||
private final FileFilter filterDAT = new FileFilter() {
|
||||
@Override
|
||||
@@ -317,7 +318,7 @@ public enum CSubmenuGauntletBuild implements ICDoc {
|
||||
return false;
|
||||
}
|
||||
|
||||
final File f = new File(GauntletIO.DIR_GAUNTLETS + name + ".dat");
|
||||
final File f = new File(NewConstants.GAUNTLET_DIR.defaultLoc + name + ".dat");
|
||||
// Confirm if overwrite
|
||||
if (f.exists()) {
|
||||
final int m = JOptionPane.showConfirmDialog(null,
|
||||
|
||||
@@ -32,6 +32,7 @@ import forge.gauntlet.GauntletIO;
|
||||
import forge.gui.SOverlayUtils;
|
||||
import forge.gui.framework.ICDoc;
|
||||
import forge.model.FModel;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.quest.QuestController;
|
||||
import forge.quest.QuestEvent;
|
||||
import forge.util.storage.IStorage;
|
||||
@@ -224,7 +225,7 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
||||
int num = 1;
|
||||
while (lstNames.contains(GauntletIO.PREFIX_QUICK + num + ".dat")) { num++; }
|
||||
FModel.SINGLETON_INSTANCE.getGauntletData().setActiveFile(new File(
|
||||
GauntletIO.DIR_GAUNTLETS + GauntletIO.PREFIX_QUICK + num + ".dat"));
|
||||
NewConstants.GAUNTLET_DIR.defaultLoc + GauntletIO.PREFIX_QUICK + num + ".dat"));
|
||||
|
||||
// Pull user deck
|
||||
final Deck userDeck;
|
||||
|
||||
@@ -78,6 +78,7 @@ public final class NewConstants {
|
||||
public static final FileLocation HOME_LAYOUT_FILE = new FileLocation(_DEFAULTS_DIR, _USER_PREFS_DIR, "home.xml");
|
||||
public static final FileLocation MATCH_LAYOUT_FILE = new FileLocation(_DEFAULTS_DIR, _USER_PREFS_DIR, "match.xml");
|
||||
public static final FileLocation EDITOR_LAYOUT_FILE = new FileLocation(_DEFAULTS_DIR, _USER_PREFS_DIR, "editor.xml");
|
||||
public static final FileLocation GAUNTLET_DIR = new FileLocation(_DEFAULTS_DIR, USER_DIR, "gauntlet/");
|
||||
|
||||
// data that is only in the cached dir
|
||||
private static final String _DB_DIR = CACHE_DIR + "db/";
|
||||
|
||||
Reference in New Issue
Block a user