mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
The prices are only estimations due to randomization. the real price will be only known when the generator was used and the final units are known
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
from dcs.vehicles import AirDefence, Unarmed
|
|
|
|
from gen.sam.airdefensegroupgenerator import (
|
|
AirDefenseRange,
|
|
AirDefenseGroupGenerator,
|
|
SkynetRole,
|
|
)
|
|
|
|
|
|
class RolandGenerator(AirDefenseGroupGenerator):
|
|
"""
|
|
This generate a Roland group
|
|
"""
|
|
|
|
name = "Roland Site"
|
|
|
|
def generate(self):
|
|
num_launchers = 2
|
|
self.add_unit(
|
|
AirDefence.Roland_Radar,
|
|
"EWR",
|
|
self.position.x + 40,
|
|
self.position.y,
|
|
self.heading,
|
|
)
|
|
positions = self.get_circular_position(
|
|
num_launchers, launcher_distance=80, coverage=240
|
|
)
|
|
|
|
for i, position in enumerate(positions):
|
|
self.add_unit(
|
|
AirDefence.Roland_ADS,
|
|
"ADS#" + str(i),
|
|
position[0],
|
|
position[1],
|
|
position[2],
|
|
)
|
|
self.add_unit(
|
|
Unarmed.M_818,
|
|
"TRUCK",
|
|
self.position.x + 80,
|
|
self.position.y,
|
|
self.heading,
|
|
)
|
|
|
|
@classmethod
|
|
def range(cls) -> AirDefenseRange:
|
|
return AirDefenseRange.Short
|
|
|
|
@classmethod
|
|
def primary_group_role(cls) -> SkynetRole:
|
|
return SkynetRole.Sam
|