diff --git a/mods/HELP/mcl_doc/init.lua b/mods/HELP/mcl_doc/init.lua index 3440b0384b..5f9e0e0ac9 100644 --- a/mods/HELP/mcl_doc/init.lua +++ b/mods/HELP/mcl_doc/init.lua @@ -65,16 +65,31 @@ end) -- Comestibles doc.sub.items.register_factoid(nil, "use", function(itemstring, def) + local s = "" if def.groups.eatable and not def._doc_items_usagehelp then if def.groups.food == 2 then - return "To eat it, wield it, then rightclick." + s = s .. "To eat it, wield it, then rightclick." + if def.groups.can_eat_when_full == 1 then + s = s .. "\n" .. "You can eat this even when your hunger bar is full." + else + s = s .. "\n" .. "You cannot eat this when your hunger bar is full." + end elseif def.groups.food == 3 then - return "To drink it, wield it, then rightclick." + s = s .. "To drink it, wield it, then rightclick." + if def.groups.can_eat_when_full ~= 1 then + s = s .. "\n" .. "You cannot drink this when your hunger bar is full." + end else - return "To consume it, wield it, then rightclick." + s = s .. "To consume it, wield it, then rightclick." + if def.groups.can_eat_when_full ~= 1 then + s = s .. "\n" .. "You cannot consume this when your hunger bar is full." + end + end + if def.groups.no_eat_delay ~= 1 then + s = s .. "\n" .. "You have to wait for about 2 seconds before you can eat or drink again." end end - return "" + return s end) doc.sub.items.register_factoid(nil, "groups", function(itemstring, def) diff --git a/mods/ITEMS/mcl_cake/init.lua b/mods/ITEMS/mcl_cake/init.lua index 6056331bc9..76693f1018 100644 --- a/mods/ITEMS/mcl_cake/init.lua +++ b/mods/ITEMS/mcl_cake/init.lua @@ -30,7 +30,7 @@ minetest.register_craft({ minetest.register_node("mcl_cake:cake", { description = "Cake", _doc_items_longdesc = "Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken.", - _doc_items_usagehelp = "Place the cake anywhere, then rightclick it to eat a single slice.", + _doc_items_usagehelp = "Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full.", tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"}, inventory_image = "cake.png", wield_image = "cake.png",