mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make EWR sites purchasable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/968
This commit is contained in:
@@ -21,6 +21,8 @@ class AirDefenseGroupGenerator(GroupGenerator, ABC):
|
||||
This is the base for all SAM group generators
|
||||
"""
|
||||
|
||||
price: int
|
||||
|
||||
def __init__(self, game: Game, ground_object: SamGroundObject) -> None:
|
||||
ground_object.skynet_capable = True
|
||||
super().__init__(game, ground_object)
|
||||
|
||||
@@ -17,8 +17,8 @@ from gen.sam.ewrs import (
|
||||
SnowDriftGenerator,
|
||||
StraightFlushGenerator,
|
||||
TallRackGenerator,
|
||||
EwrGenerator,
|
||||
)
|
||||
from gen.sam.group_generator import GroupGenerator
|
||||
|
||||
EWR_MAP = {
|
||||
"BoxSpringGenerator": BoxSpringGenerator,
|
||||
@@ -36,7 +36,7 @@ EWR_MAP = {
|
||||
|
||||
def get_faction_possible_ewrs_generator(
|
||||
faction: Faction,
|
||||
) -> List[Type[GroupGenerator]]:
|
||||
) -> List[Type[EwrGenerator]]:
|
||||
"""
|
||||
Return the list of possible EWR generators for the given faction
|
||||
:param faction: Faction name to search units for
|
||||
|
||||
@@ -5,9 +5,16 @@ from gen.sam.group_generator import GroupGenerator
|
||||
|
||||
|
||||
class EwrGenerator(GroupGenerator):
|
||||
@property
|
||||
def unit_type(self) -> VehicleType:
|
||||
raise NotImplementedError
|
||||
unit_type: VehicleType
|
||||
|
||||
@classmethod
|
||||
def name(cls) -> str:
|
||||
return cls.unit_type.name
|
||||
|
||||
@staticmethod
|
||||
def price() -> int:
|
||||
# TODO: Differentiate sites.
|
||||
return 20
|
||||
|
||||
def generate(self) -> None:
|
||||
self.add_unit(
|
||||
|
||||
Reference in New Issue
Block a user