Fine-tune briefing formatting

This commit is contained in:
Raffson 2022-11-10 17:43:05 +01:00
parent 5f67f02cde
commit 5668c37127
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 13 additions and 3 deletions

View File

@ -58,6 +58,7 @@ class MissionInfoGenerator:
self.awacs: List[AwacsInfo] = []
self.comms: List[CommInfo] = []
self.flights: List[FlightData] = []
self.player_flights: List[FlightData] = []
self.jtacs: List[JtacInfo] = []
self.tankers: List[TankerInfo] = []
self.frontlines: List[FrontLineInfo] = []
@ -87,6 +88,9 @@ class MissionInfoGenerator:
flight: Flight information.
"""
self.flights.append(flight)
if len(flight.client_units) > 0:
self.player_flights.append(flight)
def add_jtac(self, jtac: JtacInfo) -> None:
"""Adds a JTAC to the mission.

View File

@ -1,6 +1,6 @@
{# TODO: DO NOT REMOVE NEWLINES, THEY ARE PART OF THE FORMATTING! #}
DCS Retribution Turn {{ game.turn }}
====================
Most briefing information, including communications and flight plan information, can be found on your kneeboard.
Current situation:
@ -62,17 +62,20 @@ On this location, our ground forces have been ordered to hold still, and defend
{%+ endfor %}{% endif %}
{%- if player_flights|length > 0 %}
Your flights:
====================
{% for flight in flights if flight.client_units %}
{% for flight in player_flights %}
--------------------------------------------------
{{ flight.flight_type }} {{ flight.units[0].type }} x {{ flight.size }}, departing in {{ flight.departure_delay }}, {{ flight.package.target.name}}
Freq : {{ flight|intra_flight_channel }}
{% for waypoint in flight.waypoints %}
{{ loop.index0 }} {{waypoint|waypoint_timing("Depart ")}}-- {{waypoint.name}} : {{ waypoint.description}}
{% endfor %}
--------------------------------------------------{% endfor %}
--------------------------------------------------
{% endfor %}
{% endif %}
{%- if allied_flights_by_departure|length > 0 %}
Planned ally flights:
@ -83,6 +86,7 @@ Planned ally flights:
{% for flight in allied_flights_by_departure[dep] %}
{{ flight.flight_type }} {{ flight.units[0].type }} x {{flight.size}}, departing in {{ flight.departure_delay }}, {{ flight.package.target.name}}
{% endfor %}
{% endfor %}
{% endif %}
@ -98,6 +102,7 @@ TACAN : {{ runway.tacan }} {{ runway.tacan_callsign }}
{% endif %}
{% endfor %}
{% endif %}
{%- if awacs|length > 0 %}
AWACS:
@ -120,4 +125,5 @@ JTACS [F-10 Menu] :
====================
{% for jtac in jtacs %}Frontline {{ jtac.region }} -- Code : {{ jtac.code }}, Freq : {{ jtac.freq.mhz }}
{% endfor %}
{% endif %}