fix bugs wrt divert airfields for opfor (#595)

This commit is contained in:
Druss99 2025-10-19 21:40:40 -04:00 committed by GitHub
parent 9b96b7be26
commit 11fc28ad3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -27,6 +27,7 @@
* **[Campaign]** Fixed a bug where sinking a destroyer in a carrier group would cause squadrons to be removed from the carrier
* **[Engine]** Fixed a bug with transfers to Helipads
* **[Engine]** Fixed a bug with parking allocation
* **[Flight Plans]** Fixed a bug where divert airfield was broken for opfor
# Retribution v1.4.1 (hotfix)

View File

@ -81,7 +81,7 @@ class QFlightCreator(QDialog):
[
cp
for cp in game.theater.controlpoints
if cp.captured.is_blue == is_ownfor
if cp.captured.is_blue == is_ownfor and not cp.captured.is_neutral
],
self.aircraft_selector.currentData(),
"None",
@ -178,7 +178,7 @@ class QFlightCreator(QDialog):
return "You must select an aircraft type."
if squadron is None:
return "You must select a squadron."
if divert is not None and not divert.captured:
if divert is not None and divert.captured != squadron.player:
return f"{divert.name} is not owned by your coalition."
available = squadron.untasked_aircraft
if not available:

View File

@ -84,7 +84,11 @@ class FlightPlanPropertiesGroup(QGroupBox):
layout.addLayout(QLabeledWidget("Arrival:", arrival_label))
self.divert = QArrivalAirfieldSelector(
[cp for cp in game.theater.controlpoints if cp.captured.is_blue],
[
cp
for cp in game.theater.controlpoints
if cp.captured == flight.coalition.player
],
flight.unit_type,
"None",
)