summaryrefslogtreecommitdiff
path: root/src/content_inventory.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-30 17:51:21 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-30 17:51:21 +0300
commit4556c212dba726271352b05a9299564e05abb218 (patch)
tree40cf46d5d3bb7ba423f7daca4a18e0966dccb94b /src/content_inventory.cpp
parent8ceb0586b29d66ad0b4c073420590625a4b63769 (diff)
downloadminetest-4556c212dba726271352b05a9299564e05abb218.tar.gz
minetest-4556c212dba726271352b05a9299564e05abb218.tar.bz2
minetest-4556c212dba726271352b05a9299564e05abb218.zip
Made rats cookable and made them spawn near trees
Diffstat (limited to 'src/content_inventory.cpp')
-rw-r--r--src/content_inventory.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/content_inventory.cpp b/src/content_inventory.cpp
index 322250606..24840d6af 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,6 +114,10 @@ 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;
}