aboutsummaryrefslogtreecommitdiff
path: root/src/content_inventory.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-30 19:46:55 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-30 19:47:55 +0200
commit96bee29e35f0790657fbd8bb67d2af79b498255c (patch)
tree0712c75629ab16fad84af11050ef94d8c8ac8137 /src/content_inventory.cpp
parent82ea53499710c9a4e92ec595d8c14c417bdd0ee6 (diff)
parentf2051c98223d087c8ba3d7e4514935781c93ed1c (diff)
downloaddragonfireclient-96bee29e35f0790657fbd8bb67d2af79b498255c.tar.xz
Merge branch 'upstream/master'
Diffstat (limited to 'src/content_inventory.cpp')
-rw-r--r--src/content_inventory.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/content_inventory.cpp b/src/content_inventory.cpp
index 322250606..de8f8e397 100644
--- a/src/content_inventory.cpp
+++ b/src/content_inventory.cpp
@@ -65,6 +65,10 @@ std::string item_craft_get_image_name(const std::string &subname)
return "clay_brick.png";
else if(subname == "rat")
return "rat.png";
+ else if(subname == "cooked_rat")
+ return "cooked_rat.png";
+ else if(subname == "scorched_stuff")
+ return "scorched_stuff.png";
else if(subname == "firefly")
return "firefly.png";
else
@@ -98,7 +102,7 @@ s16 item_craft_get_drop_count(const std::string &subname)
bool item_craft_is_cookable(const std::string &subname)
{
- if(subname == "lump_of_iron" || subname == "lump_of_clay")
+ if(subname == "lump_of_iron" || subname == "lump_of_clay" || subname == "rat" || subname == "cooked_rat")
return true;
return false;
@@ -110,7 +114,26 @@ InventoryItem* item_craft_create_cook_result(const std::string &subname)
return new CraftItem("steel_ingot", 1);
else if(subname == "lump_of_clay")
return new CraftItem("clay_brick", 1);
+ else if(subname == "rat")
+ return new CraftItem("cooked_rat", 1);
+ else if(subname == "cooked_rat")
+ return new CraftItem("scorched_stuff", 1);
return NULL;
}
+bool item_craft_is_eatable(const std::string &subname)
+{
+ if(subname == "cooked_rat")
+ return true;
+ return false;
+}
+
+s16 item_craft_eat_hp_change(const std::string &subname)
+{
+ if(subname == "cooked_rat")
+ return 6; // 3 hearts
+ return 0;
+}
+
+