This commit is contained in:
Anuken
2020-03-08 21:53:19 -04:00
parent 863c7ae2bc
commit 0ff3c1ee78
26 changed files with 59 additions and 54 deletions

View File

@@ -77,7 +77,7 @@ public class Saves{
public void update(){
SaveSlot current = this.current;
if(current != null && !state.is(State.menu)
if(current != null && state.isGame()
&& !(state.isPaused() && Core.scene.hasDialog())){
if(lastTimestamp != 0){
totalPlaytime += Time.timeSinceMillis(lastTimestamp);
@@ -85,7 +85,7 @@ public class Saves{
lastTimestamp = Time.millis();
}
if(!state.is(State.menu) && !state.gameOver && current != null && current.isAutosave() && !state.rules.tutorial){
if(state.isGame() && !state.gameOver && current != null && current.isAutosave() && !state.rules.tutorial){
time += Time.delta();
if(time > Core.settings.getInt("saveinterval") * 60){
saving = true;
@@ -192,7 +192,7 @@ public class Saves{
SaveIO.save(file);
meta = SaveIO.getMeta(file);
if(!state.is(State.menu)){
if(state.isGame()){
current = this;
}