diff --git a/mcl_soy/item.lua b/mcl_soy/item.lua index 34e732d..59f796d 100644 --- a/mcl_soy/item.lua +++ b/mcl_soy/item.lua @@ -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, })