From 89aa8b9be1fbe3659d0bfb9263cf1c563044c04e Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 5 Apr 2011 18:23:30 +0300 Subject: 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 --- src/inventory.h | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src/inventory.h') 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"; @@ -301,6 +306,11 @@ public: return 0; return QUANTITY_ITEM_MAX_COUNT - m_count; } + /* + Other properties + */ + bool isCookable(); + InventoryItem *createCookResult(); /* Special methods */ @@ -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"; -- cgit v1.2.3