mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea, but the old mode will probably go away. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
This commit is contained in:
@@ -11,11 +11,15 @@ if TYPE_CHECKING:
|
||||
from game.theater import ConflictTheater
|
||||
|
||||
|
||||
DEFAULT_SQUADRON_SIZE = 12
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SquadronConfig:
|
||||
primary: FlightType
|
||||
secondary: list[FlightType]
|
||||
aircraft: list[str]
|
||||
max_size: int
|
||||
|
||||
name: Optional[str]
|
||||
nickname: Optional[str]
|
||||
@@ -39,6 +43,7 @@ class SquadronConfig:
|
||||
FlightType(data["primary"]),
|
||||
secondary,
|
||||
data.get("aircraft", []),
|
||||
data.get("size", DEFAULT_SQUADRON_SIZE),
|
||||
data.get("name", None),
|
||||
data.get("nickname", None),
|
||||
data.get("female_pilot_percentage", None),
|
||||
|
||||
@@ -44,6 +44,7 @@ class DefaultSquadronAssigner:
|
||||
squadron = Squadron.create_from(
|
||||
squadron_def,
|
||||
squadron_config.primary,
|
||||
squadron_config.max_size,
|
||||
control_point,
|
||||
self.coalition,
|
||||
self.game,
|
||||
|
||||
Reference in New Issue
Block a user