From 51b91befbd26b630cd2cecaec081edd03edfb5f3 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 18 Jul 2014 23:11:59 +0200 Subject: Added RemoveItem() function to the player inventory. --- src/ItemGrid.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ItemGrid.h') diff --git a/src/ItemGrid.h b/src/ItemGrid.h index c34d5e9e2..6731b0065 100644 --- a/src/ItemGrid.h +++ b/src/ItemGrid.h @@ -96,6 +96,9 @@ public: Returns the total number of items that fit. */ 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. */ + int RemoveItem(const cItem & a_ItemStack); /** Adds (or subtracts, if a_AddToCount is negative) to the count of items in the specified slot. If the slot is empty, ignores the call. -- cgit v1.2.3