diff options
author | est31 <MTest31@outlook.com> | 2015-06-20 12:55:48 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-06-23 20:18:41 +0200 |
commit | 2c1fd29884adec17564d39c0f7792633cbc55f9a (patch) | |
tree | 73bdee04a50963ac5990f08b96ee30f069aa8ce7 /src/inventory.h | |
parent | bc55ef337cc83a5c31d4fdafba352a7a26921900 (diff) | |
download | minetest-2c1fd29884adec17564d39c0f7792633cbc55f9a.tar.gz minetest-2c1fd29884adec17564d39c0f7792633cbc55f9a.tar.bz2 minetest-2c1fd29884adec17564d39c0f7792633cbc55f9a.zip |
Add MoveSomewhere inventory action
Improve shift+click experience
Diffstat (limited to 'src/inventory.h')
-rw-r--r-- | src/inventory.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/inventory.h b/src/inventory.h index faaa5ef95..e3c994fc3 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -244,7 +244,13 @@ public: // Move an item to a different list (or a different stack in the same list) // count is the maximum number of items to move (0 for everything) - void moveItem(u32 i, InventoryList *dest, u32 dest_i, u32 count = 0); + // returns number of moved items + u32 moveItem(u32 i, InventoryList *dest, u32 dest_i, + u32 count = 0, bool swap_if_needed = true); + + // like moveItem, but without a fixed destination index + // also with optional rollback recording + void moveItemSomewhere(u32 i, InventoryList *dest, u32 count); private: std::vector<ItemStack> m_items; |