mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
update to ground objects parser; waypoints in briefings & general briefings update; minor fixes
This commit is contained in:
@@ -449,10 +449,7 @@ class AircraftConflictGenerator:
|
||||
at=at and at or self._group_point(self.conflict.air_attackers_location))
|
||||
|
||||
group.task = CAP.name
|
||||
|
||||
heading = group.position.heading_between_point(self.conflict.position)
|
||||
initial_wayp = group.add_waypoint(group.position.point_from_heading(heading, WORKAROUND_WAYP_DIST), INTERCEPTION_ALT, INTERCEPTION_AIRSPEED)
|
||||
initial_wayp.tasks.append(EngageTargets(max_distance=INTERCEPT_MAX_DISTANCE))
|
||||
group.points[0].tasks.append(EngageTargets(max_distance=INTERCEPT_MAX_DISTANCE))
|
||||
|
||||
wayp = group.add_waypoint(self.conflict.position, WARM_START_ALTITUDE, INTERCEPTION_AIRSPEED)
|
||||
wayp.tasks.append(EngageTargets(max_distance=INTERCEPT_MAX_DISTANCE))
|
||||
|
||||
@@ -12,6 +12,7 @@ class BriefingGenerator:
|
||||
title = "" # type: str
|
||||
description = "" # type: str
|
||||
targets = None # type: typing.List[typing.Tuple[str, str]]
|
||||
waypoints = None # type: typing.List[str]
|
||||
|
||||
def __init__(self, mission: Mission, conflict: Conflict, game):
|
||||
self.m = mission
|
||||
@@ -20,6 +21,7 @@ class BriefingGenerator:
|
||||
|
||||
self.freqs = []
|
||||
self.targets = []
|
||||
self.waypoints = []
|
||||
|
||||
def append_frequency(self, name: str, frequency: str):
|
||||
self.freqs.append((name, frequency))
|
||||
@@ -27,7 +29,14 @@ class BriefingGenerator:
|
||||
def append_target(self, description: str, markpoint: str = None):
|
||||
self.targets.append((description, markpoint))
|
||||
|
||||
def append_waypoint(self, description: str):
|
||||
self.waypoints.append(description)
|
||||
|
||||
def generate(self):
|
||||
self.waypoints.insert(0, "INITIAL")
|
||||
self.waypoints.append("RTB")
|
||||
self.waypoints.append("RTB Landing")
|
||||
|
||||
description = ""
|
||||
|
||||
if self.title:
|
||||
@@ -43,7 +52,12 @@ class BriefingGenerator:
|
||||
|
||||
if self.targets:
|
||||
description += "\n\nTARGETS:"
|
||||
for name, tp in self.targets:
|
||||
description += "\n{} {}".format(name, "(TP {})".format(tp) if tp else "")
|
||||
for i, (name, tp) in enumerate(self.targets):
|
||||
description += "\n#{} {} {}".format(i+1, name, "(TP {})".format(tp) if tp else "")
|
||||
|
||||
if self.waypoints:
|
||||
description += "\n\nWAYPOINTS:"
|
||||
for i, descr in enumerate(self.waypoints):
|
||||
description += "\n#{}: {}".format(i+1, descr)
|
||||
|
||||
self.m.set_description_text(description)
|
||||
|
||||
Reference in New Issue
Block a user