mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Blacken.
This commit is contained in:
@@ -13,8 +13,16 @@ from ...windows.GameUpdateSignal import GameUpdateSignal
|
||||
|
||||
|
||||
class QMapControlPoint(QMapObject):
|
||||
def __init__(self, parent, x: float, y: float, w: float, h: float,
|
||||
control_point: ControlPoint, game_model: GameModel) -> None:
|
||||
def __init__(
|
||||
self,
|
||||
parent,
|
||||
x: float,
|
||||
y: float,
|
||||
w: float,
|
||||
h: float,
|
||||
control_point: ControlPoint,
|
||||
game_model: GameModel,
|
||||
) -> None:
|
||||
super().__init__(x, y, w, h, mission_target=control_point)
|
||||
self.game_model = game_model
|
||||
self.control_point = control_point
|
||||
@@ -22,8 +30,7 @@ class QMapControlPoint(QMapObject):
|
||||
self.setZValue(1)
|
||||
self.setToolTip(self.control_point.name)
|
||||
self.base_details_dialog: Optional[QBaseMenu2] = None
|
||||
self.capture_action = QAction(
|
||||
f"CHEAT: Capture {self.control_point.name}")
|
||||
self.capture_action = QAction(f"CHEAT: Capture {self.control_point.name}")
|
||||
self.capture_action.triggered.connect(self.cheat_capture)
|
||||
|
||||
self.move_action = QAction("Move")
|
||||
@@ -69,9 +76,7 @@ class QMapControlPoint(QMapObject):
|
||||
|
||||
def on_click(self) -> None:
|
||||
self.base_details_dialog = QBaseMenu2(
|
||||
self.window(),
|
||||
self.control_point,
|
||||
self.game_model
|
||||
self.window(), self.control_point, self.game_model
|
||||
)
|
||||
self.base_details_dialog.show()
|
||||
|
||||
@@ -89,7 +94,10 @@ class QMapControlPoint(QMapObject):
|
||||
return
|
||||
|
||||
for connected in self.control_point.connected_points:
|
||||
if connected.captured and self.game_model.game.settings.enable_base_capture_cheat:
|
||||
if (
|
||||
connected.captured
|
||||
and self.game_model.game.settings.enable_base_capture_cheat
|
||||
):
|
||||
menu.addAction(self.capture_action)
|
||||
break
|
||||
|
||||
@@ -105,7 +113,7 @@ class QMapControlPoint(QMapObject):
|
||||
def cancel_move(self):
|
||||
self.control_point.target_position = None
|
||||
GameUpdateSignal.get_instance().updateGame(self.game_model.game)
|
||||
|
||||
|
||||
def open_new_package_dialog(self) -> None:
|
||||
"""Extends the default packagedialog to redirect to base menu for red air base."""
|
||||
is_navy = isinstance(self.control_point, NavalControlPoint)
|
||||
|
||||
Reference in New Issue
Block a user