mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove the randomness from SAM group size.
This commit is contained in:
@@ -26,28 +26,24 @@ class FlakGenerator(AirDefenseGroupGenerator):
|
||||
price = 135
|
||||
|
||||
def generate(self):
|
||||
grid_x = random.randint(2, 3)
|
||||
grid_y = random.randint(2, 3)
|
||||
|
||||
spacing = random.randint(20, 35)
|
||||
|
||||
index = 0
|
||||
mixed = random.choice([True, False])
|
||||
unit_type = random.choice(GFLAK)
|
||||
|
||||
for i in range(grid_x):
|
||||
for j in range(grid_y):
|
||||
index = index + 1
|
||||
self.add_unit(
|
||||
unit_type,
|
||||
"AAA#" + str(index),
|
||||
self.position.x + spacing * i + random.randint(1, 5),
|
||||
self.position.y + spacing * j + random.randint(1, 5),
|
||||
self.heading,
|
||||
)
|
||||
for i in range(4):
|
||||
index = index + 1
|
||||
spacing_x = random.randint(10, 40)
|
||||
spacing_y = random.randint(10, 40)
|
||||
self.add_unit(
|
||||
unit_type,
|
||||
"AAA#" + str(index),
|
||||
self.position.x + spacing_x * i + random.randint(1, 5),
|
||||
self.position.y + spacing_y * i + random.randint(1, 5),
|
||||
self.heading,
|
||||
)
|
||||
|
||||
if mixed:
|
||||
unit_type = random.choice(GFLAK)
|
||||
if mixed:
|
||||
unit_type = random.choice(GFLAK)
|
||||
|
||||
# Search lights
|
||||
search_pos = self.get_circular_position(random.randint(2, 3), 80)
|
||||
@@ -86,8 +82,8 @@ class FlakGenerator(AirDefenseGroupGenerator):
|
||||
)
|
||||
|
||||
# Some Opel Blitz trucks
|
||||
for i in range(int(max(1, grid_x / 2))):
|
||||
for j in range(int(max(1, grid_x / 2))):
|
||||
for i in range(int(max(1, 2))):
|
||||
for j in range(int(max(1, 2))):
|
||||
self.add_unit(
|
||||
Unarmed.Blitz_36_6700A,
|
||||
"BLITZ#" + str(index),
|
||||
|
||||
Reference in New Issue
Block a user