From ada8fefd624bce6d762083e7b352210c6eed5138 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 14 Jan 2024 11:52:20 +0100 Subject: [PATCH] Fix SimulatorSaver --- .../bausystem/features/simulator/storage/SimulatorSaver.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java index 285be22f..48ccfd7a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java @@ -32,6 +32,10 @@ import java.io.IOException; public class SimulatorSaver { public void saveSimulator(File directory, Simulator simulator) { + if (!directory.exists()) { + directory.mkdirs(); + } + YAPIONObject simulatorObject = new YAPIONObject(); simulatorObject.add("material", simulator.getMaterial().name()); simulatorObject.add("autoTrace", simulator.isAutoTrace());