From 782d436681e03da268e3ff935d507c26428110bc Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Wed, 25 Jun 2025 01:27:34 +0200 Subject: [PATCH] Revert "remove saves (temporarily?) since they don't really work" This reverts commit 7929ffe2a7abcf15e07f96bf2fd1c801b0635dcc. --- src/com/gpl/rpg/atcontentstudio/model/Project.java | 12 ++++++------ src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/Project.java b/src/com/gpl/rpg/atcontentstudio/model/Project.java index fe67e7f..9e10e9d 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/Project.java +++ b/src/com/gpl/rpg/atcontentstudio/model/Project.java @@ -62,7 +62,7 @@ public class Project implements ProjectTreeNode, Serializable, JsonSerializable public transient BookmarksRoot bookmarks; -// public SavedGamesSet saves; //For simulations. + public SavedGamesSet saves; //For simulations. public transient SavedSlotCollection v; @@ -140,13 +140,13 @@ public class Project implements ProjectTreeNode, Serializable, JsonSerializable createdContent = new GameSource(this, Type.created); bookmarks = new BookmarksRoot(this); -// saves = new SavedGamesSet(this); + saves = new SavedGamesSet(this); v.add(createdContent); v.add(alteredContent); // v.add(referencedContent); v.add(baseContent); -// v.add(saves); + v.add(saves); v.add(bookmarks); } @@ -269,14 +269,14 @@ public class Project implements ProjectTreeNode, Serializable, JsonSerializable createdContent = new GameSource(this, GameSource.Type.created); bookmarks = new BookmarksRoot(this); -// saves.refreshTransients(); + saves.refreshTransients(); v = new SavedSlotCollection(); v.add(createdContent); v.add(alteredContent); // v.add(referencedContent); v.add(baseContent); -// v.add(saves); + v.add(saves); v.add(bookmarks); @@ -1017,7 +1017,7 @@ public class Project implements ProjectTreeNode, Serializable, JsonSerializable public void addSave(File selectedFile) { -// saves.addSave(selectedFile); + saves.addSave(selectedFile); } diff --git a/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java b/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java index d9e82c5..7975583 100644 --- a/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java +++ b/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java @@ -2,7 +2,6 @@ package com.gpl.rpg.atcontentstudio.utils; import com.gpl.rpg.atcontentstudio.Notification; import com.gpl.rpg.atcontentstudio.io.JsonPrettyWriter; -import com.gpl.rpg.atcontentstudio.io.JsonSerializable; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; @@ -20,9 +19,6 @@ import java.util.zip.ZipOutputStream; public class FileUtils { - public static String toJsonString(JsonSerializable jsonSerializable) { - return toJsonString(jsonSerializable.toMap()); - } public static String toJsonString(Map json) { StringWriter writer = new JsonPrettyWriter(); try {