diff options
| author | tpart <tpart120@proton.me> | 2025-10-23 20:31:16 +0200 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2025-10-23 20:31:16 +0200 |
| commit | d53a9660c38e2d7a7b896675f4295b48b902506a (patch) | |
| tree | 7b5af1b9fce614e973a70b96584ada3e75d2963f /client | |
| parent | 5d627be4a0c59ab3f5682e5f1a96fbb3595ed511 (diff) | |
| download | hurrycurry-d53a9660c38e2d7a7b896675f4295b48b902506a.tar hurrycurry-d53a9660c38e2d7a7b896675f4295b48b902506a.tar.bz2 hurrycurry-d53a9660c38e2d7a7b896675f4295b48b902506a.tar.zst | |
Don't show cursor if all hand pairs are empty
Diffstat (limited to 'client')
| -rw-r--r-- | client/player/controllable_player.gd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index 3ab60590..f2e23ae9 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -290,6 +290,12 @@ func get_interact_target() -> InteractTarget: for p: Player in game.players.values(): if not p.is_chef: continue # Customers cannot be interacted with if p.id == game.my_player_id: continue # I can't interact with myself + + var interact_possible := false + for i in range(p.hand.size()): + interact_possible = interact_possible or (p.hand[i] != null or hand[i] != null) + if not interact_possible: continue # Interaction not possible if all hand pairs are empty + var distance: float = p.position_anim.distance_to(interact_target_pos) var self_target_distance: float = p.position_anim.distance_to(movement_base_2d) if self_target_distance < MAX_PLAYER_INTERACT_DIST and distance < best_distance: |