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:
@@ -17,22 +17,19 @@ class BoforsGenerator(AirDefenseGroupGenerator):
|
||||
price = 75
|
||||
|
||||
def generate(self):
|
||||
grid_x = random.randint(2, 3)
|
||||
grid_y = random.randint(2, 3)
|
||||
|
||||
spacing = random.randint(10, 40)
|
||||
|
||||
index = 0
|
||||
for i in range(grid_x):
|
||||
for j in range(grid_y):
|
||||
index = index + 1
|
||||
self.add_unit(
|
||||
AirDefence.Bofors40,
|
||||
"AAA#" + str(index),
|
||||
self.position.x + spacing * i,
|
||||
self.position.y + spacing * j,
|
||||
self.heading,
|
||||
)
|
||||
for i in range(4):
|
||||
spacing_x = random.randint(10, 40)
|
||||
spacing_y = random.randint(10, 40)
|
||||
index = index + 1
|
||||
self.add_unit(
|
||||
AirDefence.Bofors40,
|
||||
"AAA#" + str(index),
|
||||
self.position.x + spacing_x * i,
|
||||
self.position.y + spacing_y * i,
|
||||
self.heading,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def range(cls) -> AirDefenseRange:
|
||||
|
||||
Reference in New Issue
Block a user