diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-09-16 19:09:13 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-09-16 19:09:13 +0300 |
commit | b22cb69a155d586791341d4df90060b8220361e1 (patch) | |
tree | 9ba2ec3a1f675271f05509bfe1384514a83c1772 /src/content_inventory.cpp | |
parent | 40707e3c5bc730ebc5780b1c545c5daeb3353a42 (diff) | |
parent | 88dc8c694ed0e182b4d5ace4fcd94a0a82946c31 (diff) | |
download | minetest-b22cb69a155d586791341d4df90060b8220361e1.tar.gz minetest-b22cb69a155d586791341d4df90060b8220361e1.tar.bz2 minetest-b22cb69a155d586791341d4df90060b8220361e1.zip |
Merge remote-tracking branch 'sfan5/apple-trees'
Diffstat (limited to 'src/content_inventory.cpp')
-rw-r--r-- | src/content_inventory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/content_inventory.cpp b/src/content_inventory.cpp index de8f8e397..59997ee4b 100644 --- a/src/content_inventory.cpp +++ b/src/content_inventory.cpp @@ -71,6 +71,10 @@ 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 if(subname == "apple_iron") + return "apple_iron.png"; else return "cloud.png"; // just something } @@ -126,6 +130,10 @@ bool item_craft_is_eatable(const std::string &subname) { if(subname == "cooked_rat") return true; + else if(subname == "apple") + return true; + else if(subname == "apple_iron") + return true; return false; } @@ -133,6 +141,10 @@ s16 item_craft_eat_hp_change(const std::string &subname) { if(subname == "cooked_rat") return 6; // 3 hearts + else if(subname == "apple") + return 4; // 2 hearts + else if(subname == "apple_iron") + return 8; // 4 hearts return 0; } |