mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
22 lines
570 B
Python
22 lines
570 B
Python
import random
|
|
|
|
from dcs.vehicles import AirDefence
|
|
|
|
from gen.sam.group_generator import GroupGenerator
|
|
|
|
|
|
class ZSU23Generator(GroupGenerator):
|
|
"""
|
|
This generate a ZSU 23 group
|
|
"""
|
|
|
|
name = "ZSU-23 Group"
|
|
price = 50
|
|
|
|
def generate(self):
|
|
num_launchers = random.randint(4, 5)
|
|
|
|
positions = self.get_circular_position(num_launchers, launcher_distance=120, coverage=180)
|
|
for i, position in enumerate(positions):
|
|
self.add_unit(AirDefence.SPAAA_ZSU_23_4_Shilka, "SPAA#" + str(i), position[0], position[1], position[2])
|