diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index 4b53e7c8e7..cec289943e 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -353,6 +353,16 @@ public class Control implements ApplicationListener, Loadable{ @Override public void dispose(){ + //try to save when exiting + if(saves != null && saves.getCurrent() != null && saves.getCurrent().isAutosave() && !net.client()){ + try{ + control.saves.getCurrent().save(); + Log.info("Saved on exit."); + }catch(Throwable e){ + e.printStackTrace(); + } + } + content.dispose(); net.dispose(); Musics.dispose(); diff --git a/gradle.properties b/gradle.properties index 92ac814bbd..27720fa53c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=1ccdb62216c9e6e0d85a85aa120f4dfc59b76e63 +archash=3e73cf89218478a660d45b11b7ba273ad0f66fbc