mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix: preserve active matchmaking on transient errors
This commit is contained in:
@@ -68,6 +68,8 @@ func apply_ticket_update(update: Dictionary) -> bool:
|
||||
expires_at_unix = int(update["expires_at_unix"])
|
||||
if update.has("message"):
|
||||
message = String(update["message"])
|
||||
else:
|
||||
message = ""
|
||||
_emit_changed()
|
||||
return true
|
||||
|
||||
@@ -104,6 +106,8 @@ func apply_proposal_update(update: Dictionary) -> bool:
|
||||
return _request_resync(proposal_id)
|
||||
proposal_revision = incoming_revision
|
||||
proposal_state = incoming_proposal_state
|
||||
if incoming_proposal_state == "OPEN" or incoming_proposal_state == "ACCEPTED":
|
||||
message = ""
|
||||
if update.has("expires_at_unix"):
|
||||
expires_at_unix = int(update["expires_at_unix"])
|
||||
_emit_changed()
|
||||
@@ -134,6 +138,11 @@ func fail(reason: String) -> void:
|
||||
_emit_changed()
|
||||
|
||||
|
||||
func set_notice(notice: String) -> void:
|
||||
message = notice
|
||||
_emit_changed()
|
||||
|
||||
|
||||
func can_cancel() -> bool:
|
||||
return phase == QUEUED or phase == PROPOSED or phase == ALLOCATING
|
||||
|
||||
|
||||
Reference in New Issue
Block a user