mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Prevent creating empty ferry packages.
An empty squadron or a fully-assigned squadron won't have anything to assign to the ferry mission. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1588
This commit is contained in:
parent
16d397db1c
commit
2c8f960696
@ -369,9 +369,12 @@ class Squadron:
|
||||
raise RuntimeError(
|
||||
f"Cannot plan ferry flights for {self} because there is no destination."
|
||||
)
|
||||
remaining = self.untasked_aircraft
|
||||
if not remaining:
|
||||
return
|
||||
|
||||
package = Package(self.destination)
|
||||
builder = FlightPlanBuilder(package, self.coalition, theater)
|
||||
remaining = self.untasked_aircraft
|
||||
while remaining:
|
||||
size = min(remaining, self.aircraft.max_group_size)
|
||||
self.plan_ferry_flight(builder, package, size)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user