summaryrefslogtreecommitdiff
path: root/src/content_inventory.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2011-09-11 17:50:44 +0200
committersfan5 <sfan5@live.de>2011-09-11 17:50:44 +0200
commitc0caedc3730085b3261f09e1df23cc1bdd2fce79 (patch)
tree4d278c8dd78da08caa60e70326ff49353221f05d /src/content_inventory.cpp
parentd28ea57083481bff8180249fc8b43f7ed7b18545 (diff)
downloadminetest-c0caedc3730085b3261f09e1df23cc1bdd2fce79.tar.gz
minetest-c0caedc3730085b3261f09e1df23cc1bdd2fce79.tar.bz2
minetest-c0caedc3730085b3261f09e1df23cc1bdd2fce79.zip
Added Apple Trees
Diffstat (limited to 'src/content_inventory.cpp')
-rw-r--r--src/content_inventory.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/content_inventory.cpp b/src/content_inventory.cpp
index de8f8e397..2b0dfcb3a 100644
--- a/src/content_inventory.cpp
+++ b/src/content_inventory.cpp
@@ -1,4 +1,4 @@
-/*
+ /*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
@@ -71,6 +71,8 @@ std::string item_craft_get_image_name(const std::string &subname)
return "scorched_stuff.png";
else if(subname == "firefly")
return "firefly.png";
+ else if(subname == "apple")
+ return "apple.png";
else
return "cloud.png"; // just something
}
@@ -94,7 +96,7 @@ ServerActiveObject* item_craft_create_object(const std::string &subname,
s16 item_craft_get_drop_count(const std::string &subname)
{
- if(subname == "rat" || subname == "firefly")
+ if(subname == "rat" || subname == "firefly" || subname == "apple")
return 1;
return -1;
@@ -126,6 +128,8 @@ bool item_craft_is_eatable(const std::string &subname)
{
if(subname == "cooked_rat")
return true;
+ else if(subname == "apple")
+ return true;
return false;
}
@@ -133,6 +137,8 @@ s16 item_craft_eat_hp_change(const std::string &subname)
{
if(subname == "cooked_rat")
return 6; // 3 hearts
+ else if(subname == "apple")
+ return 12; // 6 hearts
return 0;
}