mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 10:47:13 +07:00
Save on exit
This commit is contained in:
parent
d54d8a25af
commit
12f4d5a9a4
@ -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();
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=1ccdb62216c9e6e0d85a85aa120f4dfc59b76e63
|
||||
archash=3e73cf89218478a660d45b11b7ba273ad0f66fbc
|
||||
|
Loading…
Reference in New Issue
Block a user