diff options
author | Wuzzy <almikes@aol.com> | 2016-12-28 22:44:21 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-12-28 22:44:21 +0100 |
commit | 8b6b04c9f04116bee2acb449380a457ded3ddd4a (patch) | |
tree | e1b1c13d249d9b024a90613402d62a006428e25f /init.lua | |
parent | 30c870ef0bd8ffbaca798fecec942a40212f5ea9 (diff) |
Fix dig time being “inf” when maxlevel==0
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -187,7 +187,11 @@ local factoid_toolcaps = function(tool_capabilities, check_uses) local maxtime = v.times[rating] local mintime local mintimestr, maxtimestr - mintime = maxtime / maxlevel + local maxlevel_calc = maxlevel + if maxlevel_calc < 1 then + maxlevel_calc = 1 + end + mintime = maxtime / maxlevel_calc mintimestr = string.format("%.1f", mintime) maxtimestr = string.format("%.1f", maxtime) if mintimestr ~= maxtimestr then |