mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Added new Flak site configuration (now that flak 18 and bofors guns do not require WW2 asset pack)
This commit is contained in:
29
gen/sam/aaa_flak18.py
Normal file
29
gen/sam/aaa_flak18.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import random
|
||||
|
||||
from dcs.vehicles import AirDefence, Unarmed
|
||||
|
||||
from gen.sam.group_generator import GroupGenerator
|
||||
|
||||
|
||||
class Flak18Generator(GroupGenerator):
|
||||
"""
|
||||
This generate a German flak artillery group using only free units, thus not requiring the WW2 asset pack
|
||||
"""
|
||||
|
||||
name = "WW2 Flak Site"
|
||||
price = 40
|
||||
|
||||
def generate(self):
|
||||
|
||||
spacing = random.randint(30, 60)
|
||||
index = 0
|
||||
|
||||
for i in range(3):
|
||||
for j in range(2):
|
||||
index = index + 1
|
||||
self.add_unit(AirDefence.AAA_8_8cm_Flak_18, "AAA#" + str(index),
|
||||
self.position.x + spacing * i + random.randint(1, 5),
|
||||
self.position.y + spacing * j + random.randint(1, 5), self.heading)
|
||||
|
||||
# Add a commander truck
|
||||
self.add_unit(Unarmed.Blitz_3_6_6700A, "Blitz#", self.position.x - 35, self.position.y - 20, self.heading)
|
||||
Reference in New Issue
Block a user