mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Provide better feedback when declaring max-size without a value
This commit is contained in:
parent
6734b80684
commit
737df98988
@ -39,11 +39,18 @@ class SquadronConfig:
|
||||
else:
|
||||
secondary = [FlightType(s) for s in secondary_raw]
|
||||
|
||||
max_size = data.get("size", DEFAULT_SQUADRON_SIZE)
|
||||
if max_size is None:
|
||||
raise RuntimeError(
|
||||
"Squadron's size is defined in campaign but is missing a value:\n"
|
||||
f"{data}"
|
||||
)
|
||||
|
||||
return SquadronConfig(
|
||||
FlightType(data["primary"]),
|
||||
secondary,
|
||||
data.get("aircraft", []),
|
||||
data.get("size", DEFAULT_SQUADRON_SIZE),
|
||||
max_size,
|
||||
data.get("name", None),
|
||||
data.get("nickname", None),
|
||||
data.get("female_pilot_percentage", None),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user