mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Allow players to be defined in the squadron file.
https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
parent
f36757b650
commit
82ce688a0d
@ -112,6 +112,9 @@ class Squadron:
|
||||
if unit_type is None:
|
||||
raise KeyError(f"Could not find any aircraft with the ID {unit_type}")
|
||||
|
||||
pilots = [Pilot(n, player=False) for n in data.get("pilots", [])]
|
||||
pilots.extend([Pilot(n, player=True) for n in data.get("players", [])])
|
||||
|
||||
return Squadron(
|
||||
name=data["name"],
|
||||
nickname=data["nickname"],
|
||||
@ -120,7 +123,7 @@ class Squadron:
|
||||
aircraft=unit_type,
|
||||
livery=data.get("livery"),
|
||||
mission_types=tuple(FlightType.from_name(n) for n in data["mission_types"]),
|
||||
pilots=[Pilot(n) for n in data.get("pilots", [])],
|
||||
pilots=pilots,
|
||||
game=game,
|
||||
player=player,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user