mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed bugs wrt planning escort flights (#612)
This commit is contained in:
parent
0fcf308079
commit
54759f1f94
@ -22,7 +22,7 @@
|
||||
* **[AirWing]** Use aircraft display names for easier differentiation between modules
|
||||
|
||||
## Fixes
|
||||
* **[Flight Plans]** Fixed a bug when a package was created with only escort flights
|
||||
* **[Flight Plans]** Fixed bugs wrt planning escort flights
|
||||
* **[Flight Plans]** Added AntiShipStrike as a fallback task for OCA/Aircraft to fix a bug where the S-3B could not do OCA/Aircraft
|
||||
* **[Squadrons]** Fixed a bug where loading an air wing config would not properly load all squadrons
|
||||
* **[Flight Plans]** Fixed a bug where SEAD flights would fire one ARM and RTB
|
||||
|
||||
@ -23,7 +23,13 @@ class EscortFlightPlan(FormationAttackFlightPlan):
|
||||
|
||||
@property
|
||||
def split_time(self) -> datetime:
|
||||
if self.package.primary_flight and self.package.primary_flight.flight_plan:
|
||||
# Avoid infinite recursion when this escort flight is itself the primary flight
|
||||
# This can happen when only escort flights remain in a package
|
||||
if (
|
||||
self.package.primary_flight
|
||||
and self.package.primary_flight != self.flight
|
||||
and self.package.primary_flight.flight_plan
|
||||
):
|
||||
return self.package.primary_flight.flight_plan.mission_departure_time
|
||||
else:
|
||||
return super().split_time
|
||||
|
||||
@ -298,6 +298,8 @@ class QPackageDialog(QDialog):
|
||||
):
|
||||
return True
|
||||
else:
|
||||
for flight in list(self.package_model.package.flights):
|
||||
self.package_model.cancel_or_abort_flight(flight)
|
||||
QMessageBox.critical(
|
||||
self,
|
||||
"Invalid Package",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user