You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct replacement for litreParse that I think addresses the problem:
function litreParse(litre, total)
return getValueWithUnits(litre) .. "/" .. getValueWithUnits(total)
end
function getValueWithUnits(value)
local size = ""
if value < 1000 then
size = "L"
elseif value < 1000000 then
value = value / 1000
size = "kL"
else
value = value / 1000000
size = "kt"
end
return string.format("%.1f",value)..size
end
Need to show units on the current amount for clarity.
For example, right now if I see 54.0/192.0kL, it is impossible to tell from the numbers alone whether it means 54L or 54kL.
The text was updated successfully, but these errors were encountered: