From 67978d0819c5c4796fff1c53f4fa5344c799c34e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Fri, 13 Feb 2026 01:46:02 +0100 Subject: [PATCH] feat(client): wire interaction prompt target+verb to server (#405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the interaction data attachment in main.gd game loop. When E is pressed and the prompt is active, target_entity_id and verb are attached to the Interact action before sending to the server. Without a target, bare Interact is still sent as safe fallback. Completes the v0.1 interaction prompt data flow: server sends nearby_interactions → client shows prompt → E press attaches target+verb → SimBridge encodes and sends to server. Co-Authored-By: Claude Opus 4.6 --- client/scripts/main.gd | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client/scripts/main.gd b/client/scripts/main.gd index f76dccd20..4c579ee1d 100644 --- a/client/scripts/main.gd +++ b/client/scripts/main.gd @@ -29,12 +29,11 @@ func _process(_delta: float) -> void: # Send queued input to simulation var inputs = InputMapper.flush_queue() for input in inputs: - # TODO: Once server accepts Interact(InteractData), attach target + verb: - # if input.action == InputMapper.Action.INTERACT: - # var target_id: int = interaction_prompt.get_interaction_target() - # if target_id >= 0: - # input["action_data"] = { - # "target_entity_id": target_id, - # "verb": interaction_prompt.get_selected_verb(), - # } + if input.action == InputMapper.Action.INTERACT: + var target_id: int = interaction_prompt.get_interaction_target() + if target_id >= 0: + input["action_data"] = { + "target_entity_id": target_id, + "verb": interaction_prompt.get_selected_verb(), + } SimBridge.send_input(input)