mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Don't display scud sites as SAM threat range.
This commit is contained in:
parent
d2c831c4ee
commit
a63bac8826
@ -39,7 +39,11 @@ from qt_ui.widgets.map.QMapControlPoint import QMapControlPoint
|
|||||||
from qt_ui.widgets.map.QMapGroundObject import QMapGroundObject
|
from qt_ui.widgets.map.QMapGroundObject import QMapGroundObject
|
||||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||||
from theater import ControlPoint, FrontLine
|
from theater import ControlPoint, FrontLine
|
||||||
from theater.theatergroundobject import EwrGroundObject, TheaterGroundObject
|
from theater.theatergroundobject import (
|
||||||
|
EwrGroundObject,
|
||||||
|
MissileSiteGroundObject,
|
||||||
|
TheaterGroundObject,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class QLiberationMap(QGraphicsView):
|
class QLiberationMap(QGraphicsView):
|
||||||
@ -229,13 +233,15 @@ class QLiberationMap(QGraphicsView):
|
|||||||
buildings = self.game.theater.find_ground_objects_by_obj_name(ground_object.obj_name)
|
buildings = self.game.theater.find_ground_objects_by_obj_name(ground_object.obj_name)
|
||||||
scene.addItem(QMapGroundObject(self, go_pos[0], go_pos[1], 14, 12, cp, ground_object, self.game, buildings))
|
scene.addItem(QMapGroundObject(self, go_pos[0], go_pos[1], 14, 12, cp, ground_object, self.game, buildings))
|
||||||
|
|
||||||
|
is_missile = isinstance(ground_object, MissileSiteGroundObject)
|
||||||
|
is_aa = ground_object.category == "aa" and not is_missile
|
||||||
is_ewr = isinstance(ground_object, EwrGroundObject)
|
is_ewr = isinstance(ground_object, EwrGroundObject)
|
||||||
is_aa = ground_object.category == "aa" or is_ewr
|
is_display_type = is_aa or is_ewr
|
||||||
should_display = ((DisplayOptions.sam_ranges and cp.captured)
|
should_display = ((DisplayOptions.sam_ranges and cp.captured)
|
||||||
or
|
or
|
||||||
(DisplayOptions.enemy_sam_ranges and not cp.captured))
|
(DisplayOptions.enemy_sam_ranges and not cp.captured))
|
||||||
|
|
||||||
if is_aa and should_display:
|
if is_display_type and should_display:
|
||||||
detection_range, threat_range = self.aa_ranges(
|
detection_range, threat_range = self.aa_ranges(
|
||||||
ground_object
|
ground_object
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user