Tune caves
[oweals/minetest.git] / src / inventory.h
index 3f5d835895f65130fa31646daedd932652b8db14..e27da15d53b467236802e10a8f4410185c96a094 100644 (file)
@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "debug.h"
 #include "itemdef.h"
 
-struct ToolDiggingProperties;
+struct ToolCapabilities;
 
 struct ItemStack
 {
@@ -107,15 +107,15 @@ struct ItemStack
        }
 
        // Get tool digging properties, or those of the hand if not a tool
-       const ToolDiggingProperties& getToolDiggingProperties(
+       const ToolCapabilities& getToolCapabilities(
                        IItemDefManager *itemdef) const
        {
-               ToolDiggingProperties *prop;
-               prop = itemdef->get(name).tool_digging_properties;
-               if(prop == NULL)
-                       prop = itemdef->get("").tool_digging_properties;
-               assert(prop != NULL);
-               return *prop;
+               ToolCapabilities *cap;
+               cap = itemdef->get(name).tool_capabilities;
+               if(cap == NULL)
+                       cap = itemdef->get("").tool_capabilities;
+               assert(cap != NULL);
+               return *cap;
        }
 
        // Wear out (only tools)
@@ -233,6 +233,10 @@ public:
        // Similar to takeItem, but keeps the slot intact.
        ItemStack peekItem(u32 i, u32 peekcount) const;
 
+       // 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);
+
 private:
        std::vector<ItemStack> m_items;
        u32 m_size;