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
This commit is contained in:
parent
b6e37b9e67
commit
8be2841bdf
@ -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
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user