mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix so planeswalk emblems are saved
This commit is contained in:
@@ -113,6 +113,28 @@ public final class ConquestData {
|
||||
chaosBattleRecord = chaosBattleRecord0;
|
||||
}
|
||||
|
||||
public void saveData() {
|
||||
FileUtil.ensureDirectoryExists(directory);
|
||||
|
||||
try {
|
||||
XmlWriter xml = new XmlWriter(xmlFilename, "data");
|
||||
xml.write("planeswalker", planeswalker);
|
||||
xml.write("aetherShards", aetherShards);
|
||||
xml.write("planeswalkEmblems", planeswalkEmblems);
|
||||
xml.write("currentLocation", currentLocation);
|
||||
xml.write("selectedCommanderIndex", selectedCommanderIndex);
|
||||
xml.write("chaosBattleRecord", chaosBattleRecord);
|
||||
xml.write("unlockedCards", unlockedCards);
|
||||
xml.write("newCards", newCards);
|
||||
xml.write("commanders", commanders);
|
||||
xml.write("planeDataMap", planeDataMap);
|
||||
xml.close();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -284,27 +306,6 @@ public final class ConquestData {
|
||||
return chaosBattleRecord;
|
||||
}
|
||||
|
||||
public void saveData() {
|
||||
FileUtil.ensureDirectoryExists(directory);
|
||||
|
||||
try {
|
||||
XmlWriter xml = new XmlWriter(xmlFilename, "data");
|
||||
xml.write("planeswalker", planeswalker);
|
||||
xml.write("aetherShards", aetherShards);
|
||||
xml.write("currentLocation", currentLocation);
|
||||
xml.write("selectedCommanderIndex", selectedCommanderIndex);
|
||||
xml.write("chaosBattleRecord", chaosBattleRecord);
|
||||
xml.write("unlockedCards", unlockedCards);
|
||||
xml.write("newCards", newCards);
|
||||
xml.write("commanders", commanders);
|
||||
xml.write("planeDataMap", planeDataMap);
|
||||
xml.close();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void rename(final String newName) {
|
||||
name = newName;
|
||||
directory.renameTo(new File(ForgeConstants.CONQUEST_SAVE_DIR, name));
|
||||
|
||||
Reference in New Issue
Block a user