mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Avoid overpopulating bases
With the new aircraft limitations for squadrons, airfields/fobs/farps could get overpopulated at campaign start. This would cause all sorts of gnarly things like squadrons ending up with a negative amount of "owned aircraft".
This commit is contained in:
parent
35607515f6
commit
b958e9b095
@ -259,7 +259,8 @@ class Settings:
|
||||
default=False,
|
||||
detail=(
|
||||
"If set, squadrons will not be able to exceed a maximum number of aircraft "
|
||||
"(configurable), and the campaign will begin with all squadrons at full strength."
|
||||
"(configurable), and the campaign will begin with all squadrons at full strength "
|
||||
"given enough room at the base."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ class Squadron:
|
||||
raise ValueError("Squadrons can only be created with active pilots.")
|
||||
self._recruit_pilots(self.settings.squadron_pilot_limit)
|
||||
if squadrons_start_full:
|
||||
self.owned_aircraft = self.max_size
|
||||
self.owned_aircraft = min(self.max_size, self.location.unclaimed_parking())
|
||||
|
||||
def end_turn(self) -> None:
|
||||
if self.destination is not None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user