diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-07-26 13:27:27 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-07-26 13:27:27 +0200 |
commit | ef4d68adfd70488df0887f3a5fba1c9aad7a0108 (patch) | |
tree | 1ea3acb0e6b16e8badf7d1d56301bf3dd3a5d99e /src/Inventory.h | |
parent | Add armor items directly to the armor slots. (diff) | |
parent | Git: Ignore AllFiles.lst (generated by cmake) (diff) | |
download | cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.gz cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.bz2 cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.lz cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.xz cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.zst cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.zip |
Diffstat (limited to 'src/Inventory.h')
-rw-r--r-- | src/Inventory.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Inventory.h b/src/Inventory.h index e25fc4a8a..ed134aee4 100644 --- a/src/Inventory.h +++ b/src/Inventory.h @@ -86,6 +86,10 @@ public: */ int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, bool a_tryToFillEquippedFirst); + /** 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 */ bool RemoveOneEquippedItem(void); @@ -165,7 +169,7 @@ public: bool LoadFromJson(Json::Value & a_Value); protected: - bool AddToBar( cItem & a_Item, const int a_Offset, const int a_Size, bool* a_bChangedSlots, int a_Mode = 0 ); + bool AddToBar( cItem & a_Item, const int a_Offset, const int a_Size, bool* a_bChangedSlots, int a_Mode = 0); cItemGrid m_ArmorSlots; cItemGrid m_InventorySlots; |