mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
44 lines
974 B
Python
44 lines
974 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) -> None:
|
|
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
|