aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-12-24 21:59:26 +0100
committermetamuffin <metamuffin@disroot.org>2024-12-25 20:01:43 +0100
commit15be00667282a253fb438fec9d6347f5af89d9a0 (patch)
tree4218b9c95b0f89576e2f71a997c92c0828765975
parent469d554381597a383aa799b29261786de19fb08e (diff)
downloadhurrycurry-15be00667282a253fb438fec9d6347f5af89d9a0.tar
hurrycurry-15be00667282a253fb438fec9d6347f5af89d9a0.tar.bz2
hurrycurry-15be00667282a253fb438fec9d6347f5af89d9a0.tar.zst
fix two-handed clear progres
-rw-r--r--client/game.gd4
-rw-r--r--client/menu/settings/input/input_value_node.gd1
-rw-r--r--client/player/player.gd6
3 files changed, 5 insertions, 6 deletions
diff --git a/client/game.gd b/client/game.gd
index 850d539e..9a6b8808 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -166,7 +166,7 @@ func handle_packet(p):
var t: Tile = map.get_tile_instance(p.item.tile)
t.finish()
else:
- players[p.item.player].finish()
+ players[p.item.player[0]].finish(p.item.player[1])
"set_item":
var location: Dictionary = p["location"]
if p.item != null:
@@ -193,7 +193,7 @@ func handle_packet(p):
else:
var pl: Player = players[p.location.player[0]]
var h = p.location.player[1]
- pl.finish()
+ pl.finish(h)
pl.set_item(null, h)
"update_map":
var neighbors: Array = p["neighbors"]
diff --git a/client/menu/settings/input/input_value_node.gd b/client/menu/settings/input/input_value_node.gd
index 44a65ec5..9cf8327a 100644
--- a/client/menu/settings/input/input_value_node.gd
+++ b/client/menu/settings/input/input_value_node.gd
@@ -72,5 +72,4 @@ func events_equal(e1: InputEvent, e2: InputEvent) -> bool:
func _on_add_pressed() -> void:
listening = not listening
-
add_button.text = tr("c.settings.input.press_any_key") if listening else add_text
diff --git a/client/player/player.gd b/client/player/player.gd
index 3285cafc..223d2c88 100644
--- a/client/player/player.gd
+++ b/client/player/player.gd
@@ -121,11 +121,11 @@ func remove_item(h):
func progress(position__: float, speed: float, warn: bool, h):
if hand[G.hand_to_index(h)] != null: hand[G.hand_to_index(h)].progress(position__, speed, warn)
-func finish():
- if hand != null: hand.finish()
+func finish(h):
+ if hand[G.hand_to_index(h)] != null: hand[G.hand_to_index(h)].finish()
func take_item(tile: Tile, h):
- if hand != null: push_error("already holding an item")
+ if hand[G.hand_to_index(h)] != null: push_error("already holding an item")
var i = tile.take_item()
i.take()
set_item(i, h)