FARPs for heli flights WIP

This commit is contained in:
Vasyl Horbachenko
2018-09-10 23:12:04 +03:00
parent f21c515d5c
commit ca521e7e51
23 changed files with 128 additions and 222 deletions

View File

@@ -7,6 +7,8 @@ from .naming import *
from dcs.mission import *
from dcs.statics import *
FARP_FRONTLINE_DISTANCE = 10000
CATEGORY_MAPPING = {
"power": [Fortification.Workshop_A],
@@ -25,6 +27,17 @@ class GroundObjectsGenerator:
self.conflict = conflict
self.game = game
def generate_farp(self) -> StaticGroup:
assert self.conflict.is_vector, "FARP could be generated only on frontline conflicts!"
position = self.conflict.find_ground_position(self.conflict.center.point_from_heading(self.conflict.opposite_heading, FARP_FRONTLINE_DISTANCE))
return self.m.static_group(
country=self.m.country(self.game.player),
name="",
_type=Fortification.FARP_Command_Post,
position=position
)
def generate(self):
side = self.m.country(self.game.enemy)