From 824b8751dc38573363e6837784e9cb42134c7faa Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Tue, 27 Feb 2024 20:28:28 -0500 Subject: [PATCH] fix debug save --- autoloads/save.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoloads/save.gd b/autoloads/save.gd index f0fb60c..48c0375 100644 --- a/autoloads/save.gd +++ b/autoloads/save.gd @@ -153,11 +153,12 @@ class SaveFile: var current_file: SaveFile = null func _ready() -> void: - current_file = load_file("user://file%d.pr" % Options.last_file) - if current_file: - Game.difficulty = current_file.difficulty - elif OS.is_debug_build(): + if OS.is_debug_build(): current_file = SaveFile.new("user://debug_save.pr", true) + else: + current_file = load_file("user://file%d.pr" % Options.last_file) + if current_file: + Game.difficulty = current_file.difficulty ## shortcut for loading a save file from specific path func load_file(path: String) -> SaveFile: