mcl_soy: refactor: use new food registration utility.
This commit is contained in:
parent
b12dfcfbcc
commit
396d54dd0d
|
@ -8,27 +8,16 @@ mcl_vegan.register_plant_items(modname, "soy", {
|
||||||
food_strength = 1.0,
|
food_strength = 1.0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(modname .. ":tofu_raw", {
|
local reg_food = mcl_vegan.register_food
|
||||||
|
|
||||||
|
reg_food(modname, "tofu_raw", {
|
||||||
description = "Raw Tofu",
|
description = "Raw Tofu",
|
||||||
inventory_image = modname .. "_tofu_raw.png",
|
food_strength = 3.0,
|
||||||
groups = {
|
saturation = 1.0,
|
||||||
craftitem = 1,
|
|
||||||
food = 1,
|
|
||||||
eatable = 3,
|
|
||||||
},
|
|
||||||
_mcl_saturation = 1.0,
|
|
||||||
on_place = minetest.item_eat(3),
|
|
||||||
on_secondary_use = minetest.item_eat(3),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(modname .. ":tofu_cooked", {
|
reg_food(modname, "tofu_cooked", {
|
||||||
description = "Cooked Tofu",
|
description = "Cooked Tofu",
|
||||||
inventory_image = modname .. "_tofu_cooked.png",
|
food_strength = 6.0,
|
||||||
groups = {
|
saturation = 4.0,
|
||||||
food = 2,
|
|
||||||
eatable = 6,
|
|
||||||
},
|
|
||||||
_mcl_saturation = 4.0,
|
|
||||||
on_place = minetest.item_eat(6),
|
|
||||||
on_secondary_use = minetest.item_eat(6),
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue