fixed bug where game would save on level select

This commit is contained in:
pennyrigate 2023-02-20 23:24:44 -05:00
parent cf0c7848bd
commit 298308d805
3 changed files with 2 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

View file

@ -52,7 +52,7 @@ func _physics_process(delta):
#Toggle lives mode
if Input.is_action_just_pressed("shoot"):
Game.use_lives = !Game.use_lives
Game.save()
Save.set_options()
if Game.use_lives:
lives_mode_text.text = "lives are on press z to change this"
else:

View file

@ -33,6 +33,7 @@ func set_score(save_id, score, is_100 = false):
func set_options():
file.set_value("options","uselives",Game.use_lives)
save_file(Game.current_file)
func set_time(save_id, time, is_100 = false):
file.set_value(save_id, "time_100" if is_100 else "time_any", float(time))