diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 45f4d4f..dbde074 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor") local svsessions = require("supervisor.session.svsessions") -local SUPERVISOR_VERSION = "v1.0.1" +local SUPERVISOR_VERSION = "v1.0.2" local println = util.println local println_ts = util.println_ts diff --git a/supervisor/unitlogic.lua b/supervisor/unitlogic.lua index 080f529..f2ee7aa 100644 --- a/supervisor/unitlogic.lua +++ b/supervisor/unitlogic.lua @@ -793,12 +793,10 @@ function logic.handle_redstone(self) local enable_emer_cool = self.plc_cache.rps_status.low_cool or (self.auto_engaged and self.db.annunciator.CoolantLevelLow and is_active(self.alarms.ReactorOverTemp)) + -- don't turn off emergency coolant on sufficient coolant level since it might drop again + -- turn off once system is OK again + -- if auto control is engaged, alarm check will SCRAM on reactor over temp so that's covered if not self.plc_cache.rps_trip then - -- can't turn off on sufficient coolant level since it might drop again - -- turn off once system is OK again - -- if auto control is engaged, alarm check will SCRAM on reactor over temp so that's covered - self.valves.emer_cool.close() - -- set turbines to not dump steam for i = 1, #self.turbines do local session = self.turbines[i] ---@type unit_session @@ -816,8 +814,6 @@ function logic.handle_redstone(self) self.emcool_opened = false elseif enable_emer_cool or self.emcool_opened then - self.valves.emer_cool.open() - -- set turbines to dump excess steam for i = 1, #self.turbines do local session = self.turbines[i] ---@type unit_session @@ -845,6 +841,9 @@ function logic.handle_redstone(self) self.emcool_opened = true end + + -- set valve state always + if self.emcool_opened then self.valves.emer_cool.open() else self.valves.emer_cool.close() end end return logic