Add EWR generation.

Fixes https://github.com/Khopa/dcs_liberation/issues/66
This commit is contained in:
Dan Albert
2020-11-07 15:00:05 -08:00
parent 18f9b38d25
commit e8feded4c3
50 changed files with 364 additions and 54 deletions

View File

@@ -41,6 +41,7 @@ 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
class QLiberationMap(QGraphicsView):
@@ -215,7 +216,8 @@ 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_aa = ground_object.category == "aa"
is_ewr = isinstance(ground_object, EwrGroundObject)
is_aa = ground_object.category == "aa" or is_ewr
should_display = ((DisplayOptions.sam_ranges and cp.captured)
or
(DisplayOptions.enemy_sam_ranges and not cp.captured))