summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index ea74d5c..560fa43 100644
--- a/init.lua
+++ b/init.lua
@@ -112,7 +112,11 @@ local toolcaps_to_text = function(tool_capabilities)
if groupcaps ~= nil then
formstring = formstring .. "Mining capabilities:\n"
for k,v in pairs(groupcaps) do
- formstring = formstring .. "- " .. group_to_string(k, "mining") .. ": Level " .. v.maxlevel .. "\n"
+ local levelstring = ""
+ if v.maxlevel ~= nil then
+ levelstring = ": Level "..v.maxlevel
+ end
+ formstring = formstring .. "- " .. group_to_string(k, "mining") .. levelstring .. "\n"
end
end
formstring = formstring .. "\n"