fix debug save
This commit is contained in:
parent
90d0ec86c0
commit
824b8751dc
1 changed files with 5 additions and 4 deletions
|
@ -153,11 +153,12 @@ class SaveFile:
|
|||
var current_file: SaveFile = null
|
||||
|
||||
func _ready() -> void:
|
||||
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
|
||||
elif OS.is_debug_build():
|
||||
current_file = SaveFile.new("user://debug_save.pr", true)
|
||||
|
||||
## shortcut for loading a save file from specific path
|
||||
func load_file(path: String) -> SaveFile:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue