Fix display of AA ranges for most ship types.

Fixes https://github.com/Khopa/dcs_liberation/issues/390
This commit is contained in:
Dan Albert
2020-12-06 14:21:41 -08:00
parent 2012ad0aa3
commit e0223ded54
2 changed files with 22 additions and 13 deletions

View File

@@ -140,6 +140,10 @@ class TheaterGroundObject(MissionTarget):
def alive_unit_count(self) -> int:
return sum(len(g.units) for g in self.groups)
@property
def might_have_aa(self) -> bool:
return False
class BuildingGroundObject(TheaterGroundObject):
def __init__(self, name: str, category: str, group_id: int, object_id: int,
@@ -175,6 +179,10 @@ class NavalGroundObject(TheaterGroundObject):
yield FlightType.ANTISHIP
yield from super().mission_types(for_player)
@property
def might_have_aa(self) -> bool:
return True
class GenericCarrierGroundObject(NavalGroundObject):
pass
@@ -282,6 +290,10 @@ class SamGroundObject(BaseDefenseGroundObject):
yield FlightType.DEAD
yield from super().mission_types(for_player)
@property
def might_have_aa(self) -> bool:
return True
class VehicleGroupGroundObject(BaseDefenseGroundObject):
def __init__(self, name: str, group_id: int, position: Point,
@@ -325,6 +337,10 @@ class EwrGroundObject(BaseDefenseGroundObject):
yield FlightType.DEAD
yield from super().mission_types(for_player)
@property
def might_have_aa(self) -> bool:
return True
class ShipGroundObject(NavalGroundObject):
def __init__(self, name: str, group_id: int, position: Point,