diff options
| author | tpart <tpart120@proton.me> | 2025-10-12 00:09:46 +0200 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2025-10-12 00:09:53 +0200 |
| commit | 3783c0c4f20dd5d5db4be681ea41c1ad41a8a362 (patch) | |
| tree | 318388b95c53d75c73310e77ec1cc16d4d61f554 /client | |
| parent | bab30b167f8d81df92ee0f3dd6f1c1b3dfaeb9b0 (diff) | |
| download | hurrycurry-3783c0c4f20dd5d5db4be681ea41c1ad41a8a362.tar hurrycurry-3783c0c4f20dd5d5db4be681ea41c1ad41a8a362.tar.bz2 hurrycurry-3783c0c4f20dd5d5db4be681ea41c1ad41a8a362.tar.zst | |
Make interacting with customers impossible; Only interact if marker is visible
Diffstat (limited to 'client')
| -rw-r--r-- | client/player/controllable_player.gd | 21 |
1 files 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 |