diff options
author | nokoe <nokoe@mailbox.org> | 2024-07-07 14:16:58 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-07-07 14:16:58 +0200 |
commit | 27f93d1352e91c2b82c0d2a92dd4d92bfebf9795 (patch) | |
tree | 70e9879ef33401a7b8d77a74f10773a91b3c9022 /client/map/tiles | |
parent | 8028f4083a725f2062b44925e7fa91872a6d12d2 (diff) | |
download | hurrycurry-27f93d1352e91c2b82c0d2a92dd4d92bfebf9795.tar hurrycurry-27f93d1352e91c2b82c0d2a92dd4d92bfebf9795.tar.bz2 hurrycurry-27f93d1352e91c2b82c0d2a92dd4d92bfebf9795.tar.zst |
pass item from tile to tile
Diffstat (limited to 'client/map/tiles')
-rw-r--r-- | client/map/tiles/tile.gd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/map/tiles/tile.gd b/client/map/tiles/tile.gd index 039a6c1b..220a4395 100644 --- a/client/map/tiles/tile.gd +++ b/client/map/tiles/tile.gd @@ -64,6 +64,12 @@ func put_item(i: Item): push_error("already holding an item") set_item(i) +func pass_to(tile: Tile): + var i = take_item() + if tile.item != null: + push_error("target is already holding an item") + tile.set_item(i) + func set_item(i: Item): if item != null: item.queue_free() |