summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-05 18:23:30 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-05 18:23:30 +0300
commit89aa8b9be1fbe3659d0bfb9263cf1c563044c04e (patch)
tree643801781f44b395dab1f50a9cbd588dab425d79 /src/inventory.h
parent5b4928e07c8bcc877bfc2a8c0268ea9601cf699b (diff)
downloadminetest-89aa8b9be1fbe3659d0bfb9263cf1c563044c04e.tar.gz
minetest-89aa8b9be1fbe3659d0bfb9263cf1c563044c04e.tar.bz2
minetest-89aa8b9be1fbe3659d0bfb9263cf1c563044c04e.zip
Furnace is now usable. Added more tools.
--HG-- rename : data/tool_stpick.png => data/tool_stonepick.png rename : data/tool_wpick.png => data/tool_woodpick.png
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/inventory.h b/src/inventory.h
index d110f92c0..761e664a9 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -91,6 +91,8 @@ public:
/*
Other properties
*/
+ // Whether it can be cooked
+ virtual bool isCookable(){return false;}
// Time of cooking
virtual float getCookTime(){return 3.0;}
// Result of cooking
@@ -160,6 +162,7 @@ public:
/*
Other properties
*/
+ bool isCookable();
InventoryItem *createCookResult();
/*
Special methods
@@ -272,6 +275,8 @@ public:
name = "lump_of_coal.png";
else if(m_subname == "lump_of_iron")
name = "lump_of_iron.png";
+ else if(m_subname == "steel_ingot")
+ name = "steel_ingot.png";
else
name = "cloud.png";
@@ -302,6 +307,11 @@ public:
return QUANTITY_ITEM_MAX_COUNT - m_count;
}
/*
+ Other properties
+ */
+ bool isCookable();
+ InventoryItem *createCookResult();
+ /*
Special methods
*/
std::string getSubName()
@@ -348,11 +358,25 @@ public:
std::string basename;
if(m_toolname == "WPick")
- basename = "tool_wpick.png";
+ basename = "tool_woodpick.png";
else if(m_toolname == "STPick")
- basename = "tool_stpick.png";
+ basename = "tool_stonepick.png";
+ else if(m_toolname == "SteelPick")
+ basename = "tool_steelpick.png";
else if(m_toolname == "MesePick")
basename = "tool_mesepick.png";
+ else if(m_toolname == "WShovel")
+ basename = "tool_woodshovel.png";
+ else if(m_toolname == "STShovel")
+ basename = "tool_stoneshovel.png";
+ else if(m_toolname == "SteelShovel")
+ basename = "tool_steelshovel.png";
+ else if(m_toolname == "WAxe")
+ basename = "tool_woodaxe.png";
+ else if(m_toolname == "STAxe")
+ basename = "tool_stoneaxe.png";
+ else if(m_toolname == "SteelAxe")
+ basename = "tool_steelaxe.png";
else
basename = "cloud.png";