diff options
author | Wuzzy <almikes@aol.com> | 2016-12-28 19:31:28 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-12-28 19:31:28 +0100 |
commit | c7d375b65f96b7e43759f4951cce7a6b468fd141 (patch) | |
tree | 6c4911a91c5fb820a27c8d5619c5e6cd784db0ad /init.lua | |
parent | ed13ef49039aca0bdec2a1ea7a1a9e8f5d59fb6c (diff) |
Add support for unlimited uses
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -215,7 +215,11 @@ local factoid_toolcaps = function(tool_capabilities, check_uses) if check_uses and base_uses > 0 then for level=0, maxlevel do local real_uses = base_uses * math.pow(3, maxlevel - level) - miningusesstr = miningusesstr .. S("• @1, level @2: @3 uses", doc.sub.items.get_group_name(k), level, real_uses) + if real_uses < 65535 then + miningusesstr = miningusesstr .. S("• @1, level @2: @3 uses", doc.sub.items.get_group_name(k), level, real_uses) + else + miningusesstr = miningusesstr .. S("• @1, level @2: Unlimited", doc.sub.items.get_group_name(k), level) + end miningusesstr = miningusesstr .. "\n" useslines = useslines + 1 end |