mcl_tomato: refactor: use new food registration utility.
This commit is contained in:
parent
396d54dd0d
commit
5d9abe9cfe
|
@ -8,40 +8,22 @@ mcl_vegan.register_plant_items(modname, "tomato", {
|
||||||
food_strength = 2.0,
|
food_strength = 2.0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(modname .. ":pasta", {
|
local reg_food = mcl_vegan.register_food
|
||||||
|
|
||||||
|
reg_food(modname, "pasta", {
|
||||||
description = "Noddles :3",
|
description = "Noddles :3",
|
||||||
inventory_image = modname .. "_pasta.png",
|
food_strength = 3.0,
|
||||||
groups = {
|
saturation = 2.0,
|
||||||
craftitem = 1,
|
|
||||||
food = 1,
|
|
||||||
eatable = 3,
|
|
||||||
},
|
|
||||||
_mcl_saturation = 3.0,
|
|
||||||
on_place = minetest.item_eat(3),
|
|
||||||
on_secondary_use = minetest.item_eat(3),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(modname .. ":sauce", {
|
reg_food(modname, "sauce", {
|
||||||
description = "Tomato Sauce",
|
description = "Tomato Sauce",
|
||||||
inventory_image = modname .. "_sauce.png",
|
food_strength = 2.0,
|
||||||
groups = {
|
saturation = 2.0,
|
||||||
craftitem = 1,
|
|
||||||
food = 1,
|
|
||||||
eatable = 2,
|
|
||||||
},
|
|
||||||
_mcl_saturation = 2.0,
|
|
||||||
on_place = minetest.item_eat(2),
|
|
||||||
on_secondary_use = minetest.item_eat(2),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(modname .. ":pasta_with_sauce", {
|
reg_food(modname, "pasta_with_sauce", {
|
||||||
description = "Noddles with Tomato Sauce",
|
description = "Noddles with Tomato Sauce",
|
||||||
inventory_image = modname .. "_pasta_with_sauce.png",
|
food_strength = 8.0,
|
||||||
groups = {
|
saturation = 8.0,
|
||||||
food = 2,
|
|
||||||
eatable = 8,
|
|
||||||
},
|
|
||||||
_mcl_saturation = 8.0,
|
|
||||||
on_place = minetest.item_eat(8),
|
|
||||||
on_secondary_use = minetest.item_eat(8),
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue