Fix: replace match with if in send_ready lambda to fix GDScript parse error

match inside a lambda inside a function call argument confuses the GDScript
parser. Simple if is equivalent and parses correctly.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-09 18:53:17 -04:00
co-authored by Claude Happy
parent 014d264540
commit 1c0ec5fed9
+3 -6
View File
@@ -20,7 +20,7 @@ signal state_updated(state: Dictionary)
## Emitted when the game ends.
signal game_over(winner_account_id: String, win_condition: String,
winner_rank_delta: int, loser_rank_delta: int)
winner_rank_delta: int, loser_rank_delta: int)
## Emitted when the server abandons an Initializing session (e.g. server restart).
signal session_abandoned(reason: String)
@@ -132,11 +132,8 @@ func send_ready() -> void:
func(_t: String, p: Variant) -> void:
print("[Game] <<< game.ready.ack ", JSON.stringify(p))
var d := p as Dictionary
match d.get("status", ""):
"AlreadyStarted":
_fetch_state()
_:
pass # "WaitingForOpponent" / "Started": state arrives via game.state_update push,
if d.get("status", "") == "AlreadyStarted":
_fetch_state(),
func(code: String, msg: String) -> void:
print("[Game] ERR game.ready code=", code, " msg=", msg))