Detect idle Create boilers without water
This commit is contained in:
@@ -100,11 +100,15 @@ local function readBoiler(entry)
|
||||
local supply = tonumber(getValueIgnoringCase(boiler, { "Supply", "waterSupply" })) or 0
|
||||
local engines = tonumber(getValueIgnoringCase(boiler, { "Engines", "attachedEngines" })) or 0
|
||||
|
||||
-- A heat source alone does not make the boiler operational. Create reports
|
||||
-- PassiveHeat even when a campfire boiler has no water and is IDLE.
|
||||
if supply <= 0 then return "IDLE", "NO WATER", colors.red end
|
||||
if engines <= 0 then return "IDLE", "NO ENGINE", colors.red end
|
||||
|
||||
if passive > 0 then return "ONLINE", "CAMPFIRE", colors.lime end
|
||||
if heat >= 18 then return "ONLINE", "SUPERHEATED", colors.lime end
|
||||
if heat > 0 then return "ONLINE", "HEATED", colors.lime end
|
||||
if engines > 0 and supply > 0 then return "STANDBY", "NO HEAT", colors.orange end
|
||||
return "STANDBY", "COLD", colors.orange
|
||||
return "IDLE", "NO HEAT", colors.orange
|
||||
end
|
||||
|
||||
local function readMainShaft(entry)
|
||||
|
||||
Reference in New Issue
Block a user