streamline default

This commit is contained in:
2026-11-13 02:14:34 +01:00
parent 149e98c543
commit ca498db3bc
+3 -4
View File
@@ -41,12 +41,12 @@ class ThermalCapWrapper:
clock = get_component("clock") clock = get_component("clock")
default_threshold = 0.98 default_threshold = 0.98
def __init__(self, cap: ThermalCap | str, threshold: float = 0.99, outposts: list[OutpostComponent] | OutpostComponent | OutpostRef | str | None = None): def __init__(self, cap: ThermalCap | str, threshold: float = 0.98, outposts: list[OutpostComponent] | OutpostComponent | OutpostRef | str | None = None):
"""init wrapper for `ThermalCap` """init wrapper for `ThermalCap`
Args: Args:
cap (`ThermalCap`): thermal cap component. usally self. cap (`ThermalCap`): thermal cap component. usally self.
threshold (`float`, optional): percent level what thermal cap hold this pressure level. (0-1). default 0.99. threshold (`float`, optional): percent level what thermal cap hold this pressure level. (0-1). default 0.98.
outpost (`OutpostComposnent` | `OutpostRef` | `str` | `None`, optional): outpost for steam out. None = nearest. default None. outpost (`OutpostComposnent` | `OutpostRef` | `str` | `None`, optional): outpost for steam out. None = nearest. default None.
""" """
self.cap = cap self.cap = cap
@@ -248,8 +248,7 @@ class SteamTurbineWrapper:
`list[GasTank]` `list[GasTank]`
""" """
gastanks = [ get_component(s.id) for s in get_component(self.turbine.outpost.id).buildings("gas_tank") ] gastanks = [ get_component(s.id) for s in get_component(self.turbine.outpost.id).buildings("gas_tank") ]
if prefiled: if prefiled: return [ s for s in gastanks if s.fluid() == "steam" ]
return [ s for s in gastanks if s.fluid() == "steam" ]
else: return gastanks else: return gastanks
@property @property