From 888e4cae3490224bb919a905392445e7baddd277 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 21 May 2017 03:12:17 +0200 Subject: [PATCH] Add food factoids --- mods/HELP/mcl_doc/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/HELP/mcl_doc/init.lua b/mods/HELP/mcl_doc/init.lua index ff5a39a0b..3440b0384 100644 --- a/mods/HELP/mcl_doc/init.lua +++ b/mods/HELP/mcl_doc/init.lua @@ -77,6 +77,17 @@ doc.sub.items.register_factoid(nil, "use", function(itemstring, def) return "" end) +doc.sub.items.register_factoid(nil, "groups", function(itemstring, def) + local s = "" + if def.groups.eatable and def.groups.eatable > 0 then + s = s .. string.format("Hunger points restored: %d", def.groups.eatable) + end + if def._mcl_saturation and def._mcl_saturation > 0 then + s = s .. "\n" .. string.format("Saturation points restored: %.1f", def._mcl_saturation) + end + return s +end) + -- Mining, hardness and all that doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) local pickaxey = { "Diamond Pickaxe", "Iron Pickaxe", "Stone Pickaxe", "Golden Pickaxe", "Wooden Pickaxe" }