Replace (don't remove) to an empty bowl after eating a soup

This commit is contained in:
jp 2015-12-29 12:34:14 +01:00
parent 460b7dbd2f
commit 7844b0cf0b

View File

@ -35,7 +35,13 @@ minetest.register_craftitem("xdecor:bowl_soup", {
inventory_image = "xdecor_bowl_soup.png",
wield_image = "xdecor_bowl_soup.png",
groups = {not_in_creative_inventory = 1},
on_use = minetest.item_eat(30)
stack_max = 1,
on_use = function(itemstack, user, _)
local inv = user:get_inventory()
itemstack:replace("xdecor:bowl 1")
minetest.item_eat(30)
return itemstack
end
})
minetest.register_craft({