diff options
Diffstat (limited to 'client/player/player.gd')
-rw-r--r-- | client/player/player.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/client/player/player.gd b/client/player/player.gd index 1df80d94..301f7945 100644 --- a/client/player/player.gd +++ b/client/player/player.gd @@ -87,6 +87,14 @@ func remove_item() -> Item: character.holding = false return i +func progress(p: float, warn: bool): + if hand != null: + hand.progress(p, warn) + +func finish(warn: bool): + if hand != null: + hand.finish(warn) + func take_item(tile: Tile): if hand != null: push_error("already holding an item") @@ -99,6 +107,12 @@ func put_item(tile: Tile): i.put() tile.put_item(i) +func pass_to(player: Player): + var i = remove_item() + if player.hand != null: + push_error("target is already holding an item") + player.set_item(i) + func _process(delta): _anim_angle = fmod(_anim_angle + delta, TAU) hand_base.position.y = HAND_BASE_POSITION.y + 0.05 * sin(_anim_angle * 3) |