diff options
author | JacobF <queatz@gmail.com> | 2011-08-25 19:27:50 -0400 |
---|---|---|
committer | JacobF <queatz@gmail.com> | 2011-08-25 19:27:50 -0400 |
commit | 134e49cc8e442e582608411832363e15f68ea6eb (patch) | |
tree | 3da141aefcfd33680f40b95f66ee99a31543c353 /src/inventory.h | |
parent | efd8dabd913b2d1a0564378c30ae86c7a5081f06 (diff) | |
download | minetest-134e49cc8e442e582608411832363e15f68ea6eb.tar.gz minetest-134e49cc8e442e582608411832363e15f68ea6eb.tar.bz2 minetest-134e49cc8e442e582608411832363e15f68ea6eb.zip |
Merged 2 branches because they relied on each other.
This one contains these changes from main c55:
* Adds a function to check if there is room for a specific item
* Using that, you can now pick up rats if you have a full inventory and a not full rat stack
* Furnace would cook only 1 item if that item used the last available result slot, now it will continue
* Furnace will say it's overloaded
* Furnace won't wait until the next step to start on the next item
- This caused small fuels to cook slower than meant to
- Also caused furnaces to say they were out of fuel after finishing the last fuel item
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 9c2027a53..b19a365c8 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -490,7 +490,13 @@ public: InventoryItem * addItem(u32 i, InventoryItem *newitem); // Checks whether the item could be added to the given slot - bool itemFits(u32 i, InventoryItem *newitem); + bool itemFits(const u32 i, const InventoryItem *newitem); + + // Checks whether there is room for a given item + bool roomForItem(const InventoryItem *item); + + // Checks whether there is room for a given item aftr it has been cooked + bool roomForCookedItem(const InventoryItem *item); // Takes some items from a slot. // If there are not enough, takes as many as it can. |