summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h8
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;