aboutsummaryrefslogtreecommitdiff
path: root/client/player/controllable_player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/controllable_player.gd')
-rw-r--r--client/player/controllable_player.gd12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd
index d241bc2e..99625762 100644
--- a/client/player/controllable_player.gd
+++ b/client/player/controllable_player.gd
@@ -190,13 +190,13 @@ func _on_vibration_timeout():
Input.vibrate_handheld(100, vibration_strength)
vibration_timer.start()
-func put_item(tile: Tile, h):
+func put_item(tile: Tile, h: int):
super(tile, h)
if Global.get_setting("gameplay.vibration"):
Input.start_joy_vibration(0, 0.1, 0.0, 0.075)
Input.vibrate_handheld(75, 0.1)
-func take_item(tile: Tile, h):
+func take_item(tile: Tile, h: int):
super(tile, h)
if Global.get_setting("gameplay.vibration"):
Input.start_joy_vibration(0, 0.1, 0.0, 0.075)
@@ -210,18 +210,18 @@ func interact():
# clear last interaction if target has moved since
if last_interaction != null and not last_interaction == target:
- game.mp.send_tile_interact(game.player_id, last_interaction, false, "left")
+ game.mp.send_tile_interact(game.player_id, last_interaction, false, 0)
marker.set_interacting(false)
last_interaction = null
marker.set_interactive(game.get_tile_interactive(target))
marker_target = tile.item_base.global_position
- for h in ["left", "right"]:
- if Input.is_action_just_pressed("interact_"+h) and last_interaction == null:
+ for h in [0, 1]:
+ if Input.is_action_just_pressed("interact_"+G.index_to_hand(h)) and last_interaction == null:
last_interaction = target
game.mp.send_tile_interact(game.player_id, target, true, h)
tile.interact()
marker.set_interacting(true)
- if Input.is_action_just_released("interact_"+h):
+ if Input.is_action_just_released("interact_"+G.index_to_hand(h)):
last_interaction = null
game.mp.send_tile_interact(game.player_id, target, false, h)
marker.set_interacting(false)