mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add cheat option to capture bases.
Capturing bases is sometimes really annoying because of the DCS unit AI and our non-optimal ground victory heuristics. Add a cheat option to allow the player to move on without the tedium.
This commit is contained in:
@@ -37,6 +37,9 @@ class QMapObject(QGraphicsRectItem):
|
||||
if event.button() == Qt.LeftButton:
|
||||
self.on_click()
|
||||
|
||||
def add_context_menu_actions(self, menu: QMenu) -> None:
|
||||
pass
|
||||
|
||||
def contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent) -> None:
|
||||
menu = QMenu("Menu", self.parent)
|
||||
|
||||
@@ -48,6 +51,8 @@ class QMapObject(QGraphicsRectItem):
|
||||
new_package_action.triggered.connect(self.open_new_package_dialog)
|
||||
menu.addAction(new_package_action)
|
||||
|
||||
self.add_context_menu_actions(menu)
|
||||
|
||||
menu.exec_(event.screenPos())
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user