Save on exit

This commit is contained in:
Anuken 2020-05-14 15:18:04 -04:00
parent d54d8a25af
commit 12f4d5a9a4
2 changed files with 11 additions and 1 deletions

View File

@ -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();

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=1ccdb62216c9e6e0d85a85aa120f4dfc59b76e63
archash=3e73cf89218478a660d45b11b7ba273ad0f66fbc