diff options
author | tpart <tpart120@proton.me> | 2024-09-19 22:37:24 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-19 22:37:28 +0200 |
commit | 4f0e0a5b9dd1f71c7275a3b74289480f77b89fe8 (patch) | |
tree | d971fbf731ee5fdc9622f59be789575a9c130ca3 /client/game.gd | |
parent | 60adc9a098920f96a3ff1aefe791c129dfc5aa3e (diff) | |
download | hurrycurry-4f0e0a5b9dd1f71c7275a3b74289480f77b89fe8.tar hurrycurry-4f0e0a5b9dd1f71c7275a3b74289480f77b89fe8.tar.bz2 hurrycurry-4f0e0a5b9dd1f71c7275a3b74289480f77b89fe8.tar.zst |
Only save tutorial as completed if succesful
Diffstat (limited to 'client/game.gd')
-rw-r--r-- | client/game.gd | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/client/game.gd b/client/game.gd index b597b7ef..0fc42333 100644 --- a/client/game.gd +++ b/client/game.gd @@ -237,13 +237,15 @@ func handle_packet(p): tutorial_running = false update_tutorial_running.emit(tutorial_running) - var played: Array = Global.get_profile("tutorials_played") - played.append(item_names[p.item]) - Global.set_profile("tutorials_played", played) - Global.save_profile() - while item_names[p.item] in tutorial_queue: - tutorial_queue.erase(item_names[p.item]) + if p.success: + var played: Array = Global.get_profile("tutorials_played") + played.append(item_names[p.item]) + Global.set_profile("tutorials_played", played) + Global.save_profile() + + while item_names[p.item] in tutorial_queue: + tutorial_queue.erase(item_names[p.item]) if not tutorial_queue.is_empty(): tutorial_running = true |