mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 12:05:09 +00:00
Add food factoids
This commit is contained in:
parent
0167a2f41b
commit
888e4cae34
1 changed files with 11 additions and 0 deletions
|
@ -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" }
|
||||
|
|
Loading…
Reference in a new issue