Nahrungspunkte für Pizza-Mod

This commit is contained in:
N-Nachtigal 2025-05-13 19:24:36 +02:00
parent 23dda4593a
commit 9dbc0b2ba1
4 changed files with 6 additions and 5 deletions

View file

@ -120,7 +120,7 @@ function jpizza.make_pizzas()
description = "Slice of "..base.name.." Pizza",
inventory_image = "jelys_pizzaria_pizza_slice.png^"..base.topping_inv[2],
stack_max = 6,
groups = {food = 1},
groups = {food = 1, eatable = (1+base.eat)},
on_use = minetest.item_eat(1+base.eat)
})
if jpizza.has_depends.hunger_ng then
@ -182,7 +182,7 @@ function jpizza.make_pizzas()
description = "Slice of "..base.name.." and "..side.name.." Pizza",
inventory_image = "jelys_pizzaria_pizza_slice.png^"..base.topping_inv[num1].."^"..side.topping_inv[num2],
stack_max = 6,
groups = {food = 1},
groups = {food = 1, eatable = (1+base.eat+side.eat)},
on_use = minetest.item_eat(1+base.eat+side.eat)
})
minetest.register_alias(pizza_name.."_slice", "jelys_pizzaria:pizza_"..side.name.."_"..base.name)

View file

@ -25,6 +25,7 @@ minetest.register_craftitem("jelys_pizzaria:burnt_pizza_slice", {
description = "Burned Pizza Slice",
inventory_image = "jelys_pizzaria_burnt_pizza_slice.png",
stack_max = 12,
groups = {eatable = -2},
on_use = function(itemstack, player, pointed_thing)
minetest.chat_send_player(player:get_player_name(), "Blecht")
return minetest.do_item_eat(-2, "", itemstack, player, pointed_thing)
@ -129,7 +130,7 @@ minetest.register_craft({
minetest.register_craftitem("jelys_pizzaria:hainac_slice", {
description = "Slice of \"Heart attack in a circle\" pizza",
inventory_image = "jelys_pizzaria_hainac_slice.png",
groups = {food = 1},
groups = {food = 1, eatable = 20},
on_use = function(itemstack, player, pointed_thing)
minetest.after(1, function(itemstack, player, pointed_thing)
if player:get_hp() > 0 then

View file

@ -137,7 +137,7 @@ if not jpizza.has_depends.pineapple and (not farming or farming and not farming.
type = "fixed",
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2, eatable = 2},
on_use = minetest.item_eat(2),
sounds = default.node_sound_leaves_defaults(),
})

View file

@ -137,7 +137,7 @@ minetest.register_craftitem("jelys_pizzaria:cheese_pizza_slice", {
description = "Slice of Cheese Pizza",
stack_max = 6,
inventory_image = "jelys_pizzaria_pizza_slice.png",
groups = {food = 1},
groups = {food = 1, eatable = 1},
on_use = minetest.item_eat(1),
})