From 8f3dca8e937d3fa36b7837f2b19afa8e2ee0cf21 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 14 Dec 2016 13:19:37 +0100 Subject: =?UTF-8?q?Replace=20=E2=80=9Cmining=20capabilities=E2=80=9D=20w/?= =?UTF-8?q?=20maxlevel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index e6f2572..96735f3 100644 --- a/init.lua +++ b/init.lua @@ -190,14 +190,12 @@ local toolcaps_to_text = function(tool_capabilities, check_uses) end end local levelstring - if v.maxlevel == 0 then - levelstring = S("level 0") - elseif v.maxlevel ~= nil then - levelstring = S("level 0-@1", v.maxlevel) + if v.maxlevel ~= nil then + levelstring = tostring(v.maxlevel) else levelstring = S("any level") end - miningcapstr = miningcapstr .. S("• @1: @2, @3", doc.sub.items.get_group_name(k), ratingstring, levelstring) + miningcapstr = miningcapstr .. S("• @1: @2", doc.sub.items.get_group_name(k), levelstring) miningcapstr = miningcapstr .. "\n" caplines = caplines + 1 @@ -219,6 +217,7 @@ local toolcaps_to_text = function(tool_capabilities, check_uses) doc.sub.items.get_group_name(k), rating, mintimestr, maxtimestr) else + miningtimesstr = miningtimesstr .. S("• @1, rating @2: @3s", doc.sub.items.get_group_name(k), rating, mintimestr) @@ -239,7 +238,7 @@ local toolcaps_to_text = function(tool_capabilities, check_uses) end end if caplines > 0 then - formstring = formstring .. S("This tool is capable of mining.\nMining capabilities:\n") + formstring = formstring .. S("This tool is capable of mining.\nMaximum mining levels:\n") formstring = formstring .. miningcapstr formstring = newline(formstring) end -- cgit v1.2.3