diff --git a/changelog.md b/changelog.md index 208ad055..f6aed661 100644 --- a/changelog.md +++ b/changelog.md @@ -29,6 +29,7 @@ Saves from 2.3 are not compatible with 2.4. * **[Factions]** Removed the F-111 unit from the NATO desert storm faction. (Recruiting it would cause crashes in DCS, since it is not a valid unit) * **[Units]** Fixed SPG_Stryker_M1128_MGS not being in db * **[Mission Generator]** Empty navy groups will no longer be generated +* **[Flight Planner]** Fixed not being able to plan packages against opfor carriers # 2.3.2 diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 229531d0..a22ea097 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -550,7 +550,6 @@ class NavalControlPoint(ControlPoint, ABC): return True def mission_types(self, for_player: bool) -> Iterator[FlightType]: - yield from super().mission_types(for_player) from gen.flights.flight import FlightType if self.is_friendly(for_player): yield from [ @@ -561,6 +560,7 @@ class NavalControlPoint(ControlPoint, ABC): ] else: yield FlightType.ANTISHIP + yield from super().mission_types(for_player) @property def heading(self) -> int: diff --git a/qt_ui/widgets/map/QMapControlPoint.py b/qt_ui/widgets/map/QMapControlPoint.py index 8249d33a..e8607ff3 100644 --- a/qt_ui/widgets/map/QMapControlPoint.py +++ b/qt_ui/widgets/map/QMapControlPoint.py @@ -4,7 +4,7 @@ from PySide2.QtGui import QColor, QPainter from PySide2.QtWidgets import QAction, QMenu import qt_ui.uiconstants as const -from game.theater import ControlPoint +from game.theater import ControlPoint, NavalControlPoint from qt_ui.models import GameModel from qt_ui.windows.basemenu.QBaseMenu2 import QBaseMenu2 from .QMapObject import QMapObject @@ -108,7 +108,8 @@ class QMapControlPoint(QMapObject): def open_new_package_dialog(self) -> None: """Extends the default packagedialog to redirect to base menu for red air base.""" - if not self.control_point.captured: - self.on_click() - else: - super(QMapControlPoint, self).open_new_package_dialog() + is_navy = isinstance(self.control_point, NavalControlPoint) + if self.control_point.captured or is_navy: + super().open_new_package_dialog() + return + self.on_click()