mcl_soy: refactor: use new food registration utility.

This commit is contained in:
trans_soup 2023-07-17 13:05:42 +02:00
parent b12dfcfbcc
commit 396d54dd0d

View file

@ -8,27 +8,16 @@ mcl_vegan.register_plant_items(modname, "soy", {
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",
inventory_image = modname .. "_tofu_raw.png",
groups = {
craftitem = 1,
food = 1,
eatable = 3,
},
_mcl_saturation = 1.0,
on_place = minetest.item_eat(3),
on_secondary_use = minetest.item_eat(3),
food_strength = 3.0,
saturation = 1.0,
})
minetest.register_craftitem(modname .. ":tofu_cooked", {
reg_food(modname, "tofu_cooked", {
description = "Cooked Tofu",
inventory_image = modname .. "_tofu_cooked.png",
groups = {
food = 2,
eatable = 6,
},
_mcl_saturation = 4.0,
on_place = minetest.item_eat(6),
on_secondary_use = minetest.item_eat(6),
food_strength = 6.0,
saturation = 4.0,
})