Cooking: Regain health/satiation the right way
This commit is contained in:
parent
4209040b90
commit
627b80b470
@ -10,18 +10,7 @@ minetest.register_craftitem("xdecor:bowl_soup", {
|
|||||||
wield_image = "xdecor_bowl_soup.png",
|
wield_image = "xdecor_bowl_soup.png",
|
||||||
groups = {not_in_creative_inventory=1},
|
groups = {not_in_creative_inventory=1},
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = function(itemstack, user)
|
on_use = minetest.item_eat(30, "xdecor:bowl")
|
||||||
itemstack:replace("xdecor:bowl 1")
|
|
||||||
if rawget(_G, "hunger") then
|
|
||||||
minetest.item_eat(20)
|
|
||||||
elseif rawget(_G, "hbhunger") then
|
|
||||||
hbhunger.hunger[user:get_player_name()] = 30
|
|
||||||
hbhunger.set_hunger_raw(user)
|
|
||||||
else
|
|
||||||
user:set_hp(20)
|
|
||||||
end
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("xdecor:hammer", {
|
minetest.register_tool("xdecor:hammer", {
|
||||||
|
Loading…
Reference in New Issue
Block a user