Move tool stuff to tool.{h,cpp}
[oweals/minetest.git] / src / inventory.cpp
index ec1a81b180a25013c3c18f79111623d5d24672c8..ea5b696366ee1daac9bdb0bfedefdec2d8bdcb56 100644 (file)
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "player.h"
 #include "log.h"
 #include "mapnode_contentfeatures.h"
+#include "tool.h"
 
 /*
        InventoryItem
@@ -166,6 +167,15 @@ InventoryItem *MaterialItem::createCookResult() const
        return item_material_create_cook_result(m_content);
 }
 
+/*
+       ToolItem
+*/
+
+std::string ToolItem::getImageBasename() const
+{
+       return tool_get_imagename(m_toolname);
+}
+
 /*
        CraftItem
 */