mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix New Package for naval control points.
Also reordered the tasks so ship-specific tasks appear first. Fixes https://github.com/Khopa/dcs_liberation/issues/628 (cherry picked from commit 8be2841bdfcf420996db5f15de4c00bc9227ef58)
This commit is contained in:
parent
0d0d582bd8
commit
6045f4dd91
@ -27,6 +27,7 @@
|
|||||||
* **[UI]** Ship groups could be replaced by SAM sites in the UI, which would lead to broken mission being generated - fixed
|
* **[UI]** Ship groups could be replaced by SAM sites in the UI, which would lead to broken mission being generated - fixed
|
||||||
* **[New Game Wizard]** Removed the "mid game" campaign generator option which is currently broken
|
* **[New Game Wizard]** Removed the "mid game" campaign generator option which is currently broken
|
||||||
* **[Mission Generator]** Empty navy groups will no longer be generated
|
* **[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
|
# 2.3.2
|
||||||
|
|
||||||
|
|||||||
@ -550,7 +550,6 @@ class NavalControlPoint(ControlPoint, ABC):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
|
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
|
||||||
yield from super().mission_types(for_player)
|
|
||||||
from gen.flights.flight import FlightType
|
from gen.flights.flight import FlightType
|
||||||
if self.is_friendly(for_player):
|
if self.is_friendly(for_player):
|
||||||
yield from [
|
yield from [
|
||||||
@ -561,6 +560,7 @@ class NavalControlPoint(ControlPoint, ABC):
|
|||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
yield FlightType.ANTISHIP
|
yield FlightType.ANTISHIP
|
||||||
|
yield from super().mission_types(for_player)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def heading(self) -> int:
|
def heading(self) -> int:
|
||||||
|
|||||||
@ -4,7 +4,7 @@ from PySide2.QtGui import QColor, QPainter
|
|||||||
from PySide2.QtWidgets import QAction, QMenu
|
from PySide2.QtWidgets import QAction, QMenu
|
||||||
|
|
||||||
import qt_ui.uiconstants as const
|
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.models import GameModel
|
||||||
from qt_ui.windows.basemenu.QBaseMenu2 import QBaseMenu2
|
from qt_ui.windows.basemenu.QBaseMenu2 import QBaseMenu2
|
||||||
from .QMapObject import QMapObject
|
from .QMapObject import QMapObject
|
||||||
@ -108,7 +108,8 @@ class QMapControlPoint(QMapObject):
|
|||||||
|
|
||||||
def open_new_package_dialog(self) -> None:
|
def open_new_package_dialog(self) -> None:
|
||||||
"""Extends the default packagedialog to redirect to base menu for red air base."""
|
"""Extends the default packagedialog to redirect to base menu for red air base."""
|
||||||
if not self.control_point.captured:
|
is_navy = isinstance(self.control_point, NavalControlPoint)
|
||||||
self.on_click()
|
if self.control_point.captured or is_navy:
|
||||||
else:
|
super().open_new_package_dialog()
|
||||||
super(QMapControlPoint, self).open_new_package_dialog()
|
return
|
||||||
|
self.on_click()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user