diff --git a/client/scripts/main.gd b/client/scripts/main.gd index ded0a9e..246c82f 100644 --- a/client/scripts/main.gd +++ b/client/scripts/main.gd @@ -307,12 +307,18 @@ func _ensure_cooldown_poll_timer() -> void: func _on_hotbar_loadout_changed_sync_cooldown(_loadout: Dictionary) -> void: - if is_instance_valid(_cooldown_client) and _cooldown_client.has_method("request_sync_from_server"): + if ( + is_instance_valid(_cooldown_client) + and _cooldown_client.has_method("request_sync_from_server") + ): _cooldown_client.call("request_sync_from_server") func _on_cooldown_poll_timeout() -> void: - if is_instance_valid(_cooldown_client) and _cooldown_client.has_method("request_sync_from_server"): + if ( + is_instance_valid(_cooldown_client) + and _cooldown_client.has_method("request_sync_from_server") + ): _cooldown_client.call("request_sync_from_server") @@ -470,7 +476,9 @@ func _request_hotbar_cast_slot(slot_index: int) -> void: if _cooldown_state != null and _cooldown_state.has_method("is_slot_cooling"): if bool(_cooldown_state.call("is_slot_cooling", resolved_slot)): if is_instance_valid(_cast_feedback_label): - _cast_feedback_label.text = "ability_cast_denied: %s (client guard)" % COOLDOWN_REASON_ON_CD + _cast_feedback_label.text = ( + "ability_cast_denied: %s (client guard)" % COOLDOWN_REASON_ON_CD + ) push_warning("ability_cast_denied reasonCode=%s (client guard)" % COOLDOWN_REASON_ON_CD) return var started: bool = false diff --git a/client/test/cooldown_state_test.gd b/client/test/cooldown_state_test.gd index c2117f1..1cc4ae9 100644 --- a/client/test/cooldown_state_test.gd +++ b/client/test/cooldown_state_test.gd @@ -6,7 +6,7 @@ const CooldownStateScript := preload("res://scripts/cooldown_state.gd") func test_remaining_is_zero_when_end_before_server_time() -> void: - # Arrange + # Arrange — server anchor after end → slot reads as ready. var state: RefCounted = CooldownStateScript.new() var snap := { "serverTimeUtc": "2026-01-01T12:01:00.000Z",