From 3783c0c4f20dd5d5db4be681ea41c1ad41a8a362 Mon Sep 17 00:00:00 2001 From: tpart Date: Sun, 12 Oct 2025 00:09:46 +0200 Subject: Make interacting with customers impossible; Only interact if marker is visible --- client/player/controllable_player.gd | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index 93cc0481..dc697556 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -235,16 +235,17 @@ func interact(): marker.set_interacting(false) last_interaction = null marker.set_interactive(found_interact_target) - for h in [0, 1]: - if Input.is_action_just_pressed("interact_" + G.index_to_hand(h)) and last_interaction == null: - last_interaction = target_tile - game.mp.send_tile_interact(game.my_player_id, target_tile, true, h if h < Global.hand_count else 0) - tile.interact() - marker.set_interacting(true) - if Input.is_action_just_released("interact_" + G.index_to_hand(h)): - last_interaction = null - game.mp.send_tile_interact(game.my_player_id, target_tile, false, h if h < Global.hand_count else 0) - marker.set_interacting(false) + if found_interact_target: + for h in [0, 1]: + if Input.is_action_just_pressed("interact_" + G.index_to_hand(h)) and last_interaction == null: + last_interaction = target_tile + game.mp.send_tile_interact(game.my_player_id, target_tile, true, h if h < Global.hand_count else 0) + tile.interact() + marker.set_interacting(true) + if Input.is_action_just_released("interact_" + G.index_to_hand(h)): + last_interaction = null + game.mp.send_tile_interact(game.my_player_id, target_tile, false, h if h < Global.hand_count else 0) + marker.set_interacting(false) else: marker.visible = false -- cgit v1.3