optimizations and cleanup for pull request
This commit is contained in:
@@ -725,14 +725,14 @@ function unit.new(reactor_id, num_boilers, num_turbines)
|
||||
-- can't be disconnected
|
||||
if self.plc_i == nil then return false end
|
||||
|
||||
-- reactor must be stopped and RPS can't be tripped
|
||||
if self.plc_i.get_status().status or self.plc_i.get_db().rps_tripped then return false end
|
||||
|
||||
-- alarms must be inactive and not tripping
|
||||
for _, alarm in pairs(self.alarms) do
|
||||
if not (alarm.state == AISTATE.INACTIVE or alarm.state == AISTATE.RING_BACK) then return false end
|
||||
end
|
||||
|
||||
-- reactor must be stopped and RPS can't be tripped
|
||||
if self.plc_i.get_status().status or self.plc_i.get_db().rps_tripped then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user