Format with updated black

This commit is contained in:
Raffson
2024-10-12 17:20:44 +02:00
parent 11a9d67b91
commit 5fdf38c663
58 changed files with 164 additions and 187 deletions

View File

@@ -40,20 +40,16 @@ class FrozenCombat(ABC):
events: GameUpdateEvents,
time: datetime,
elapsed_time: timedelta,
) -> None:
...
) -> None: ...
@abstractmethod
def because(self) -> str:
...
def because(self) -> str: ...
@abstractmethod
def describe(self) -> str:
...
def describe(self) -> str: ...
@abstractmethod
def iter_flights(self) -> Iterator[Flight]:
...
def iter_flights(self) -> Iterator[Flight]: ...
def update_flight_states(self) -> None:
for flight in self.iter_flights():

View File

@@ -18,8 +18,7 @@ class JoinableCombat(FrozenCombat, ABC):
self.flights = flights
@abstractmethod
def joinable_by(self, flight: Flight) -> bool:
...
def joinable_by(self, flight: Flight) -> bool: ...
def join(self, flight: Flight) -> None:
assert isinstance(flight.state, InFlight)

View File

@@ -343,9 +343,11 @@ class MissionResultsProcessor:
settings = source.coalition.game.settings
reserves = max(
1,
settings.reserves_procurement_target
if source.captured
else settings.reserves_procurement_target_red,
(
settings.reserves_procurement_target
if source.captured
else settings.reserves_procurement_target_red
),
)
total_units = source.base.total_armor
reserves_factor = (reserves - 1) / total_units # slight underestimation