diff options
author | Wuzzy <almikes@aol.com> | 2016-08-01 06:17:59 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-01 06:17:59 +0200 |
commit | 0c0b1ccdb4158fbef101f9433b5ae8a51f2c87d8 (patch) | |
tree | 87e33cd68cb9d3e7c1c81f24ba699c1804b281ce /init.lua | |
parent | 500044d9d26c0fcc40b0c2b20740f12543f2319c (diff) |
Tools: Hide maxlevel if missing
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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" |