feat(multiplayer): expose action retry in matchmaking UI

This commit is contained in:
Josh Creek
2026-09-01 17:03:31 +01:00
parent 6ef55affcb
commit d85c8b8194
2 changed files with 11 additions and 2 deletions
+9 -2
View File
@@ -58,6 +58,11 @@ func _on_queue_pressed() -> void:
if retry_err != OK:
_on_local_error("Could not retry matchmaking: %s" % error_string(retry_err))
return
if ControlPlaneClient.can_retry_last_mutation():
var mutation_err := ControlPlaneClient.retry_last_mutation()
if mutation_err != OK:
_on_local_error("Could not retry matchmaking action: %s" % error_string(mutation_err))
return
if not _can_start_new_search(ControlPlaneClient.state.phase):
return
_elapsed_seconds = 0.0
@@ -178,8 +183,10 @@ func _render(snapshot: Dictionary) -> void:
cancel_button.visible = ControlPlaneClient.state.can_cancel()
accept_button.visible = phase == MatchmakingState.PROPOSED
decline_button.visible = phase == MatchmakingState.PROPOSED
queue_button.disabled = ControlPlaneClient.auth_expired or not (_can_start_new_search(phase) or ControlPlaneClient.can_retry_queue_create())
queue_button.text = "Retry Search" if ControlPlaneClient.can_retry_queue_create() else "Search"
var retry_search := ControlPlaneClient.can_retry_queue_create()
var retry_mutation := ControlPlaneClient.can_retry_last_mutation()
queue_button.disabled = ControlPlaneClient.auth_expired or not (_can_start_new_search(phase) or retry_search or retry_mutation)
queue_button.text = "Retry Search" if retry_search else ("Retry Request" if retry_mutation else "Search")
static func _is_terminal(phase: String) -> bool: