Keep pump units off until explicitly enabled
This commit is contained in:
@@ -97,6 +97,8 @@ class Reactor:
|
||||
self.meltdown = False
|
||||
self.primary_pump_active = False
|
||||
self.secondary_pump_active = False
|
||||
self.primary_pump_units = [False] * len(self.primary_pump_units)
|
||||
self.secondary_pump_units = [False] * len(self.secondary_pump_units)
|
||||
self.turbine_unit_active = [False] * len(self.turbines)
|
||||
self.turbine_active = any(self.turbine_unit_active)
|
||||
if self.consumer:
|
||||
@@ -481,8 +483,6 @@ class Reactor:
|
||||
LOGGER.info("Primary pump %s", "enabled" if active else "stopped")
|
||||
if not active:
|
||||
self.primary_pump_units = [False] * len(self.primary_pump_units)
|
||||
elif active and not any(self.primary_pump_units):
|
||||
self.primary_pump_units = [True] * len(self.primary_pump_units)
|
||||
|
||||
def _set_secondary_pump(self, active: bool) -> None:
|
||||
if self.secondary_pump_active != active:
|
||||
@@ -490,8 +490,6 @@ class Reactor:
|
||||
LOGGER.info("Secondary pump %s", "enabled" if active else "stopped")
|
||||
if not active:
|
||||
self.secondary_pump_units = [False] * len(self.secondary_pump_units)
|
||||
elif active and not any(self.secondary_pump_units):
|
||||
self.secondary_pump_units = [True] * len(self.secondary_pump_units)
|
||||
|
||||
def _toggle_primary_pump_unit(self, index: int, active: bool) -> None:
|
||||
if index < 0 or index >= len(self.primary_pump_units):
|
||||
|
||||
Reference in New Issue
Block a user