From e48f5b968123bc61b9468def33c84f3def580b14 Mon Sep 17 00:00:00 2001 From: Elkien3 Date: Sat, 23 Sep 2017 21:34:40 -0500 Subject: [PATCH] Edit cake to support hud They will now fill your hunder instead of heal. --- mods/cake/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/cake/init.lua b/mods/cake/init.lua index 1453620..0ee1d9f 100644 --- a/mods/cake/init.lua +++ b/mods/cake/init.lua @@ -47,8 +47,12 @@ for i, size in ipairs(sizes) do } }, on_rightclick = function(pos, node, clicker) - clicker:set_hp(clicker:get_hp() + 1) - + -- clicker:set_hp(clicker:get_hp() + 1) + local name = clicker:get_player_name() + local h = tonumber(hud.hunger[name]) + h = h + 4 + hud.hunger[name] = h + hud.set_hunger(clicker) if i < #sizes then minetest.swap_node(pos, {name="cake:cake_"..i}) else