mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
feat(multiplayer): expose action retry in matchmaking UI
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user