aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/game.gd8
-rw-r--r--client/gui/overlays/controls_visualization/explanation.gd4
2 files changed, 3 insertions, 9 deletions
diff --git a/client/game.gd b/client/game.gd
index 0c2d51e9..14274b14 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -308,11 +308,9 @@ func handle_packet(p):
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()
- else:
- mp.send_ready()
+ await menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", [profile_name, using_joypad, two_handed])
+ Profile.write(profile_name, true)
+ mp.send_ready()
else:
map.autoflush = false
await get_parent()._menu_exit()
diff --git a/client/gui/overlays/controls_visualization/explanation.gd b/client/gui/overlays/controls_visualization/explanation.gd
index 77147f1d..b5a39118 100644
--- a/client/gui/overlays/controls_visualization/explanation.gd
+++ b/client/gui/overlays/controls_visualization/explanation.gd
@@ -20,8 +20,6 @@ var profile_name: String
var using_joypad: bool
var two_handed: bool
-@onready var game: Game = $"../Game"
-
@onready var title: Label = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/Title
@onready var keyboard_explanation: KeyboardExplanation = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/KeyboardExplanation
@onready var controller_explanation: ControllerExplanation = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/ControllerExplanation
@@ -39,6 +37,4 @@ func _ready():
super()
func _on_accept_pressed() -> void:
- Profile.write(profile_name, true)
- game.mp.send_ready()
exit()