diff options
author | madmaxoft <github@xoft.cz> | 2014-07-18 23:47:46 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-07-18 23:47:46 +0200 |
commit | 13311c700ffbd94f28fe38654bda4bf026d2a8ce (patch) | |
tree | c1519a78237f23b90d9b54a166f1118696d3e96c | |
parent | Added RemoveItem() function to the player inventory. (diff) | |
download | cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar.gz cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar.bz2 cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar.lz cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar.xz cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.tar.zst cuberite-13311c700ffbd94f28fe38654bda4bf026d2a8ce.zip |
-rw-r--r-- | src/Inventory.h | 3 | ||||
-rw-r--r-- | src/ItemGrid.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Inventory.h b/src/Inventory.h index 6e32536b3..5175afd14 100644 --- a/src/Inventory.h +++ b/src/Inventory.h @@ -86,7 +86,8 @@ public: */ int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, bool a_tryToFillEquippedFirst); - /** Remove the specified item with the specified amount from the inventory. Returns the amount from the items were was removed. */ + /** Removes the specified item from the inventory, as many as possible, up to a_ItemStack.m_ItemCount. + Returns the number of items that were removed. */ int RemoveItem(const cItem & a_ItemStack); /** Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed */ diff --git a/src/ItemGrid.h b/src/ItemGrid.h index 6731b0065..8d6544792 100644 --- a/src/ItemGrid.h +++ b/src/ItemGrid.h @@ -97,7 +97,8 @@ public: */ int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks = true, int a_PrioritarySlot = -1); - /** Remove the specified item with the specified amount from the inventory. Returns the amount from the items were was removed. */ + /** Removes the specified item from the grid, as many as possible, up to a_ItemStack.m_ItemCount. + Returns the number of items that were removed. */ int RemoveItem(const cItem & a_ItemStack); /** Adds (or subtracts, if a_AddToCount is negative) to the count of items in the specified slot. |