Make EWR sites purchasable.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/968
This commit is contained in:
Dan Albert
2021-05-31 16:32:43 -07:00
parent 45919200c4
commit 8604faffe6
6 changed files with 111 additions and 24 deletions

View File

@@ -197,6 +197,10 @@ class TheaterGroundObject(MissionTarget):
def capturable(self) -> bool:
raise NotImplementedError
@property
def purchasable(self) -> bool:
raise NotImplementedError
class BuildingGroundObject(TheaterGroundObject):
def __init__(
@@ -262,6 +266,10 @@ class BuildingGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return True
@property
def purchasable(self) -> bool:
return False
class SceneryGroundObject(BuildingGroundObject):
def __init__(
@@ -337,6 +345,10 @@ class NavalGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return False
class GenericCarrierGroundObject(NavalGroundObject):
@property
@@ -405,6 +417,10 @@ class MissileSiteGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return False
class CoastalSiteGroundObject(TheaterGroundObject):
def __init__(
@@ -430,6 +446,10 @@ class CoastalSiteGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return False
# TODO: Differentiate types.
# This type gets used both for AA sites (SAM, AAA, or SHORAD). These should each
@@ -513,6 +533,10 @@ class SamGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return True
class VehicleGroupGroundObject(TheaterGroundObject):
def __init__(
@@ -537,6 +561,10 @@ class VehicleGroupGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return True
class EwrGroundObject(TheaterGroundObject):
def __init__(
@@ -577,6 +605,10 @@ class EwrGroundObject(TheaterGroundObject):
def capturable(self) -> bool:
return False
@property
def purchasable(self) -> bool:
return True
class ShipGroundObject(NavalGroundObject):
def __init__(