1
0
Fork 0

Add food factoids

objects
Wuzzy 2017-05-21 03:12:17 +02:00
parent 0167a2f41b
commit 888e4cae34
1 changed files with 11 additions and 0 deletions

View File

@ -77,6 +77,17 @@ doc.sub.items.register_factoid(nil, "use", function(itemstring, def)
return "" return ""
end) 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 -- Mining, hardness and all that
doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def)
local pickaxey = { "Diamond Pickaxe", "Iron Pickaxe", "Stone Pickaxe", "Golden Pickaxe", "Wooden Pickaxe" } local pickaxey = { "Diamond Pickaxe", "Iron Pickaxe", "Stone Pickaxe", "Golden Pickaxe", "Wooden Pickaxe" }