dcs_liberation/gen/fleet/schnellboot.py
Dan Albert 4e9d661c0c Flesh out typing information, enforce.
(cherry picked from commit fb9a0fe833198d41a911f22d5efc4e3c4829c316)
2021-08-08 12:52:04 -07:00

21 lines
588 B
Python

import random
from dcs.ships import Schnellboot_type_S130
from gen.sam.group_generator import ShipGroupGenerator
class SchnellbootGroupGenerator(ShipGroupGenerator):
def generate(self) -> None:
for i in range(random.randint(2, 4)):
self.add_unit(
Schnellboot_type_S130,
"Schnellboot" + str(i),
self.position.x + i * random.randint(100, 250),
self.position.y + (random.randint(100, 200) - 100),
self.heading,
)
self.get_generated_group().points[0].speed = 20