mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Don't plan DEAD missions against scuds.
Fixes https://github.com/Khopa/dcs_liberation/issues/355
This commit is contained in:
@@ -40,6 +40,7 @@ from theater import (
|
||||
FrontLine,
|
||||
MissionTarget,
|
||||
TheaterGroundObject,
|
||||
SamGroundObject,
|
||||
)
|
||||
|
||||
# Avoid importing some types that cause circular imports unless type checking.
|
||||
@@ -242,15 +243,15 @@ class ObjectiveFinder:
|
||||
found_targets: Set[str] = set()
|
||||
for cp in self.enemy_control_points():
|
||||
for ground_object in cp.ground_objects:
|
||||
if not isinstance(ground_object, SamGroundObject):
|
||||
continue
|
||||
|
||||
if ground_object.is_dead:
|
||||
continue
|
||||
|
||||
if ground_object.name in found_targets:
|
||||
continue
|
||||
|
||||
if ground_object.dcs_identifier != "AA":
|
||||
continue
|
||||
|
||||
if not self.object_has_radar(ground_object):
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user