Fix AISM soaking failing to reset.

This was causing Lux tool infusion not to reset when
tools are removed from lux, i.e. putting a tool back
into the lux flow will "credit" the tool with infusion time
for the time since it was removed.
This commit is contained in:
Aaron Suen 2019-12-25 16:05:47 -05:00
parent 2106569e7b
commit 8801e30e7d

View File

@ -42,7 +42,7 @@ local function soaking_core(def, reg, getmeta)
if rate == false then
meta:set_string(def.qtyfield, "")
meta:set_string(def.timefield, "")
return
return ...
end
rate = rate or 0
local ticks = 1 + math_floor((now - start) / def.soakinterval)
@ -55,7 +55,7 @@ local function soaking_core(def, reg, getmeta)
if set == false then
meta:set_string(def.qtyfield, "")
meta:set_string(def.timefield, "")
return
return ...
end
meta:set_float(def.qtyfield, set and type(set) == "number" and set or total)
meta:set_float(def.timefield, start)