dcs-retribution/gen/sam/sam_sa6.py
RndName b2db27f9aa remove prices from sam generators
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
2021-07-02 16:46:16 -07:00

44 lines
966 B
Python

import random
from dcs.vehicles import AirDefence
from gen.sam.airdefensegroupgenerator import (
AirDefenseRange,
AirDefenseGroupGenerator,
)
class SA6Generator(AirDefenseGroupGenerator):
"""
This generate a SA-6 group
"""
name = "SA-6 Kub Site"
def generate(self):
self.add_unit(
AirDefence.Kub_1S91_str,
"STR",
self.position.x,
self.position.y,
self.heading,
)
num_launchers = 4
positions = self.get_circular_position(
num_launchers, launcher_distance=120, coverage=360
)
for i, position in enumerate(positions):
self.add_unit(
AirDefence.Kub_2P25_ln,
"LN#" + str(i),
position[0],
position[1],
position[2],
)
@classmethod
def range(cls) -> AirDefenseRange:
return AirDefenseRange.Medium