mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-07 05:02:04 +02:00
Savegames!
This commit is contained in:
parent
76c4aab834
commit
5c1f1ce722
4 changed files with 20 additions and 8 deletions
scenes
|
@ -143,6 +143,12 @@ func show_win_status(win_states):
|
|||
level_description.hide()
|
||||
level_congrats.show()
|
||||
$SuccessSound.play()
|
||||
if not game.state.has("solved_levels"):
|
||||
game.state["solved_levels"] = []
|
||||
var slug = levels.chapters[game.current_chapter].slug + "/" + level.slug
|
||||
if not slug in game.state["solved_levels"]:
|
||||
game.state["solved_levels"].push_back(slug)
|
||||
game.save_state()
|
||||
|
||||
func repopulate_levels():
|
||||
levels.reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue