diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-03-12 16:53:25 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-03-12 16:53:25 +0000 |
commit | bece919362c6c2cd1f6489d2a87f71663b54d74c (patch) | |
tree | 39444e9c43fcf55d0555b5594d9e00a583d29590 | |
parent | a4b3916f86dc96d78195d372d9025c8c3b822c1d (diff) |
added food groups for better recipe handling
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | food.lua | 9 | ||||
-rw-r--r-- | onion.lua | 1 | ||||
-rw-r--r-- | plantlife.lua | 1 | ||||
-rw-r--r-- | strawberry.lua | 1 |
5 files changed, 10 insertions, 3 deletions
@@ -13,6 +13,7 @@ Ethereal Mapgen mod for Minetest (works on all except v6) ### 1.24 - Updating code to newer functions, requires Minetest 0.4.16 and above + - Added food groups to be more compatible with other food mods ### 1.23 @@ -16,7 +16,7 @@ minetest.register_node("ethereal:banana", { fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31} }, groups = { - fleshy = 3, dig_immediate = 3, flammable = 2, + food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 1, leafdecay_drop = 1 }, drop = "ethereal:banana", @@ -63,7 +63,7 @@ minetest.register_node("ethereal:orange", { fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27} }, groups = { - fleshy = 3, dig_immediate = 3, flammable = 2, + food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1 }, drop = "ethereal:orange", @@ -81,6 +81,7 @@ minetest.register_craftitem("ethereal:pine_nuts", { description = S("Pine Nuts"), inventory_image = "pine_nuts.png", wield_image = "pine_nuts.png", + groups = {food_pine_nuts = 1, flammable = 2}, on_use = minetest.item_eat(1), }) @@ -89,6 +90,7 @@ minetest.register_craftitem("ethereal:banana_bread", { description = S("Banana Loaf"), inventory_image = "banana_bread.png", wield_image = "banana_bread.png", + groups = {food_bread = 1, flammable = 3}, on_use = minetest.item_eat(6), }) @@ -107,7 +109,7 @@ minetest.register_node("ethereal:coconut", { fixed = {-0.31, -0.43, -0.31, 0.31, 0.44, 0.31} }, groups = { - snappy = 1, oddly_breakable_by_hand = 1, cracky = 1, + food_coconut = 1, snappy = 1, oddly_breakable_by_hand = 1, cracky = 1, choppy = 1, flammable = 1, leafdecay = 3, leafdecay_drop = 1 }, drop = "ethereal:coconut_slice 4", @@ -119,6 +121,7 @@ minetest.register_craftitem("ethereal:coconut_slice", { description = S("Coconut Slice"), inventory_image = "moretrees_coconut_slice.png", wield_image = "moretrees_coconut_slice.png", + groups = {food_coconut_slice = 1, flammable = 1}, on_use = minetest.item_eat(1), }) @@ -6,6 +6,7 @@ minetest.register_craftitem("ethereal:wild_onion_plant", { description = S("Wild Onion"),
inventory_image = "wild_onion.png",
wield_image = "wild_onion.png",
+ groups = {food_onion = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:wild_onion_1")
end,
diff --git a/plantlife.lua b/plantlife.lua index 3f9a714..31846e3 100644 --- a/plantlife.lua +++ b/plantlife.lua @@ -146,6 +146,7 @@ minetest.register_node("ethereal:fern", { minetest.register_craftitem("ethereal:fern_tubers", { description = S("Fern Tubers"), inventory_image = "fern_tubers.png", + groups = {food_tuber = 1, flammable = 2}, on_use = minetest.item_eat(1), }) diff --git a/strawberry.lua b/strawberry.lua index eea150f..9f9b949 100644 --- a/strawberry.lua +++ b/strawberry.lua @@ -6,6 +6,7 @@ minetest.register_craftitem("ethereal:strawberry", { description = S("Strawberry"), inventory_image = "strawberry.png", wield_image = "strawberry.png", + groups = {food_strawberry = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1") end, |