Ground objects are always generated and destroyable, even when it's not the current mission objective.

Fix : SAM site destruction status is saved correctly.
Added most SAM site to generator.
This commit is contained in:
Khopa
2019-10-06 16:14:13 +02:00
parent 17352bfcf7
commit 2167953b87
40 changed files with 808 additions and 68 deletions

21
gen/sam/sam_sa3.py Normal file
View File

@@ -0,0 +1,21 @@
import random
from dcs.vehicles import AirDefence
from gen.sam.group_generator import AntiAirGroupGenerator
class SA3Generator(AntiAirGroupGenerator):
"""
This generate a SA-3 group
"""
def generate(self):
self.add_unit(AirDefence.SAM_SR_P_19, "SR", self.position.x, self.position.y, self.heading)
self.add_unit(AirDefence.SAM_SA_3_S_125_TR_SNR, "TR", self.position.x + 20, self.position.y, self.heading)
num_launchers = random.randint(3, 6)
positions = self.get_circular_position(num_launchers, launcher_distance=120, coverage=180)
for i, position in enumerate(positions):
self.add_unit(AirDefence.SAM_SA_3_S_125_LN_5P73, "LN#" + str(i), position[0], position[1], position[2])