Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator

This commit is contained in:
MetalStormGhost
2024-05-09 21:16:32 +03:00
25 changed files with 262 additions and 73 deletions

View File

@@ -22,6 +22,10 @@ class FlightRoster(IFlightRoster):
def iter_pilots(self) -> Iterator[Pilot | None]:
yield from self.pilots
@property
def player_count(self) -> int:
return len([p for p in self.pilots if p is not None and p.player])
def pilot_at(self, idx: int) -> Pilot | None:
return self.pilots[idx]

View File

@@ -26,6 +26,11 @@ class IFlightRoster(ABC):
def max_size(self) -> int:
...
@property
@abstractmethod
def player_count(self) -> int:
...
@abstractmethod
def resize(self, new_size: int) -> None:
...