mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Merge branch 'theater-refactor' into develop
This commit is contained in:
@@ -95,7 +95,7 @@ class QFlightTypeComboBox(QComboBox):
|
||||
yield from self.ENEMY_AIRBASE_MISSIONS
|
||||
elif isinstance(self.target, TheaterGroundObject):
|
||||
# TODO: Filter more based on the category.
|
||||
friendly = self.target.parent_control_point(self.theater).captured
|
||||
friendly = self.target.control_point.captured
|
||||
if friendly:
|
||||
yield from self.FRIENDLY_GROUND_OBJECT_MISSIONS
|
||||
else:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
|
||||
from game import Game
|
||||
from gen import Conflict, FlightWaypointType
|
||||
from gen import BuildingGroundObject, Conflict, FlightWaypointType
|
||||
from gen.flights.flight import FlightWaypoint
|
||||
from qt_ui.widgets.combos.QFilteredComboBox import QFilteredComboBox
|
||||
from theater import ControlPointType
|
||||
@@ -71,7 +71,7 @@ class QPredefinedWaypointSelectionComboBox(QFilteredComboBox):
|
||||
for cp in self.game.theater.controlpoints:
|
||||
if (self.include_enemy and not cp.captured) or (self.include_friendly and cp.captured):
|
||||
for ground_object in cp.ground_objects:
|
||||
if not ground_object.is_dead and not ground_object.dcs_identifier == "AA":
|
||||
if not ground_object.is_dead and not isinstance(ground_object, BuildingGroundObject):
|
||||
wpt = FlightWaypoint(
|
||||
FlightWaypointType.CUSTOM,
|
||||
ground_object.position.x,
|
||||
|
||||
@@ -121,8 +121,8 @@ class QLiberationMap(QGraphicsView):
|
||||
|
||||
def setGame(self, game: Optional[Game]):
|
||||
self.game = game
|
||||
logging.debug("Reloading Map Canvas")
|
||||
if self.game is not None:
|
||||
logging.debug("Reloading Map Canvas")
|
||||
self.reload_scene()
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user