diff --git a/client/scripts/ability_cast_client.gd b/client/scripts/ability_cast_client.gd index 6a6bc53..4cc8b57 100644 --- a/client/scripts/ability_cast_client.gd +++ b/client/scripts/ability_cast_client.gd @@ -1,7 +1,8 @@ extends Node ## NEO-31: prototype HTTP client for `POST /game/players/{id}/ability-cast`. -## NEO-28: emits [signal cast_result_received] when the response body is JSON [AbilityCastResponse] v1. +## NEO-28: emits [signal cast_result_received] when the response body is JSON +## [AbilityCastResponse] v1. signal cast_result_received(accepted: bool, reason_code: String) @export var base_url: String = "http://127.0.0.1:5253" diff --git a/client/test/ability_cast_client_test.gd b/client/test/ability_cast_client_test.gd index 1f4970b..25df6b7 100644 --- a/client/test/ability_cast_client_test.gd +++ b/client/test/ability_cast_client_test.gd @@ -149,7 +149,11 @@ func test_cast_result_received_emits_false_with_reason_on_denied() -> void: ) var c := _make_client(transport) var got: Array = [] - c.connect("cast_result_received", func(accepted: bool, reason: String): got.append([accepted, reason])) + c.connect( + "cast_result_received", + func(accepted: bool, reason: String) -> void: + got.append([accepted, reason]) + ) # Act var started: bool = bool(c.call("request_cast", 0, "prototype_pulse", "prototype_target_alpha")) # Assert @@ -165,7 +169,11 @@ func test_cast_result_received_emits_true_with_empty_reason_on_accepted() -> voi transport.enqueue(HTTPRequest.RESULT_SUCCESS, 200, '{"schemaVersion":1,"accepted":true}') var c := _make_client(transport) var got: Array = [] - c.connect("cast_result_received", func(accepted: bool, reason: String): got.append([accepted, reason])) + c.connect( + "cast_result_received", + func(accepted: bool, reason: String) -> void: + got.append([accepted, reason]) + ) # Act var started: bool = bool(c.call("request_cast", 0, "prototype_pulse", null)) # Assert