aboutsummaryrefslogtreecommitdiff
path: root/client/game.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-09-30 14:34:30 +0200
committertpart <tpart120@proton.me>2025-09-30 14:34:34 +0200
commitb4a046026e687a3b44ce2be0cbab1150bd3545ca (patch)
treeb32446ec30a9ded0e70c3489c4fadd288fd69412 /client/game.gd
parent7fc0484a680ab777174aec1c1ffcbb61cd19c479 (diff)
downloadhurrycurry-b4a046026e687a3b44ce2be0cbab1150bd3545ca.tar
hurrycurry-b4a046026e687a3b44ce2be0cbab1150bd3545ca.tar.bz2
hurrycurry-b4a046026e687a3b44ce2be0cbab1150bd3545ca.tar.zst
Store if correct explanation for input device was shown in profile
Diffstat (limited to 'client/game.gd')
-rw-r--r--client/game.gd9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/game.gd b/client/game.gd
index 9d2f7177..465c1aec 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -312,10 +312,11 @@ func handle_packet(p):
elif not is_replay:
menu.submenu("res://gui/menus/ingame.tscn")
elif not in_lobby and not is_replay and not Global.using_touch and p.state:
- if Global.hand_count == 1 and not Profile.read("controls_one_handed_explained"):
- menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", false)
- elif Global.hand_count == 2 and not Profile.read("controls_two_handed_explained"):
- menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", true)
+ var using_joypad: bool = Global.using_joypad
+ var two_handed: bool = Global.hand_count >= 2
+ var profile_name: String = "controls_%s_%s_handed_explained" % [("joypad" if using_joypad else "keyboard"), ("two" if two_handed else "one")]
+ if not Profile.read(profile_name):
+ menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", [profile_name, using_joypad, two_handed])
else:
mp.send_ready()
"score":