Don't plan SEAD when only a search radar remains.

This commit is contained in:
Dan Albert
2021-05-23 13:15:42 -07:00
parent 1d7b0c9b17
commit fa321c7ddc
2 changed files with 8 additions and 8 deletions

View File

@@ -143,12 +143,11 @@ class TheaterGroundObject(MissionTarget):
return False
@property
def has_alive_radar(self) -> bool:
"""Returns True if the ground object contains a unit with radar."""
def has_live_radar_sam(self) -> bool:
"""Returns True if the ground object contains a unit with working radar SAM."""
for group in self.groups:
for unit in group.units:
if db.unit_type_from_name(unit.type) in UNITS_WITH_RADAR:
return True
if self.threat_range(group, radar_only=True):
return True
return False
def _max_range_of_type(self, group: Group, range_type: str) -> Distance: