Harden lobby/game ready flow for out-of-order joins and stale clicks
This commit is contained in:
@@ -71,6 +71,7 @@ func _exit_tree() -> void:
|
||||
CustomLobby.partner_left.disconnect(_on_partner_left)
|
||||
CustomLobby.rule_suggestion_received.disconnect(_on_rule_suggestion_received)
|
||||
CustomLobby.rule_suggestion_rejected.disconnect(_on_rule_suggestion_rejected)
|
||||
CustomLobby.lobby_notice.disconnect(_on_lobby_notice)
|
||||
|
||||
# ── Setup ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -135,6 +136,7 @@ func _connect_signals() -> void:
|
||||
CustomLobby.partner_left.connect(_on_partner_left)
|
||||
CustomLobby.rule_suggestion_received.connect(_on_rule_suggestion_received)
|
||||
CustomLobby.rule_suggestion_rejected.connect(_on_rule_suggestion_rejected)
|
||||
CustomLobby.lobby_notice.connect(_on_lobby_notice)
|
||||
|
||||
# ── Refresh ───────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -352,6 +354,10 @@ func _on_rule_suggestion_rejected() -> void:
|
||||
_show_toast("Host rejected your rule suggestion.")
|
||||
|
||||
|
||||
func _on_lobby_notice(message: String) -> void:
|
||||
_show_toast(message)
|
||||
|
||||
|
||||
func _on_suggestion_accept_pressed() -> void:
|
||||
suggestion_banner.visible = false
|
||||
CustomLobby.accept_rule_suggestion()
|
||||
|
||||
Reference in New Issue
Block a user