Don't display scud sites as SAM threat range.

This commit is contained in:
Dan Albert 2020-11-09 21:51:55 -08:00
parent d2c831c4ee
commit a63bac8826

View File

@ -39,7 +39,11 @@ from qt_ui.widgets.map.QMapControlPoint import QMapControlPoint
from qt_ui.widgets.map.QMapGroundObject import QMapGroundObject
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
from theater import ControlPoint, FrontLine
from theater.theatergroundobject import EwrGroundObject, TheaterGroundObject
from theater.theatergroundobject import (
EwrGroundObject,
MissileSiteGroundObject,
TheaterGroundObject,
)
class QLiberationMap(QGraphicsView):
@ -229,13 +233,15 @@ class QLiberationMap(QGraphicsView):
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))
is_missile = isinstance(ground_object, MissileSiteGroundObject)
is_aa = ground_object.category == "aa" and not is_missile
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)
or
(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(
ground_object
)