mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +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 (cherry picked from commit b2db27f9aa06ddbeb6c9e87686abb04cd2f2bb16)
41 lines
959 B
Python
41 lines
959 B
Python
from dcs.vehicles import AirDefence
|
|
|
|
from gen.sam.airdefensegroupgenerator import (
|
|
AirDefenseRange,
|
|
AirDefenseGroupGenerator,
|
|
)
|
|
|
|
|
|
class SA8Generator(AirDefenseGroupGenerator):
|
|
"""
|
|
This generate a SA-8 group
|
|
"""
|
|
|
|
name = "SA-8 OSA Site"
|
|
|
|
def generate(self):
|
|
num_launchers = 2
|
|
positions = self.get_circular_position(
|
|
num_launchers, launcher_distance=120, coverage=180
|
|
)
|
|
|
|
for i, position in enumerate(positions):
|
|
self.add_unit(
|
|
AirDefence.Osa_9A33_ln,
|
|
"OSA" + str(i),
|
|
position[0],
|
|
position[1],
|
|
position[2],
|
|
)
|
|
self.add_unit(
|
|
AirDefence.SA_8_Osa_LD_9T217,
|
|
"LD",
|
|
self.position.x + 20,
|
|
self.position.y,
|
|
self.heading,
|
|
)
|
|
|
|
@classmethod
|
|
def range(cls) -> AirDefenseRange:
|
|
return AirDefenseRange.Medium
|