Build mission kneeboards.

This includes most of the briefing information in the kneeboard:

* Airfield info
* Waypoint info
* Comm info
* AWACS
* Tankers
* JTAC

There's more that could be done:

* Restrict tankers to the type compatible with the current aircraft
* Support for carriers
* Merge all relevant comm info (tankers, AWACS, JTAC, other flights)
  into the comm ladder

This gives us a good start and a framework to build on. Very likely
that we'll want to split part of this (probably the comm ladder) off
onto a separate page once we start adding more to this, since it's a
pretty full page currently.

Also missing is any checking that the contents do not go beyond the
bounds of the page. We could add this if needed. For now the page has
enough room for about a dozen waypoints, which is quite a bit more
than most missions need.
This commit is contained in:
Dan Albert
2020-08-27 01:52:21 -07:00
parent 66af6be063
commit e7e82dcd0b
9 changed files with 436 additions and 4 deletions

View File

@@ -221,17 +221,28 @@ class Operation:
load_dcs_libe.add_action(DoScript(String(script)))
self.current_mission.triggerrules.triggers.append(load_dcs_libe)
kneeboard_generator = KneeboardGenerator(self.current_mission, self.game)
# Briefing Generation
for i, tanker_type in enumerate(self.airsupportgen.generated_tankers):
self.briefinggen.append_frequency("Tanker {} ({})".format(TANKER_CALLSIGNS[i], tanker_type), "{}X/{} MHz AM".format(60+i, 130+i))
callsign = TANKER_CALLSIGNS[i]
tacan = f"{60 + i}X"
freq = f"{130 + i} MHz AM"
self.briefinggen.append_frequency(f"Tanker {callsign} ({tanker_type})", f"{tacan}/{freq}")
kneeboard_generator.add_tanker(callsign, tanker_type, freq, tacan)
if self.is_awacs_enabled:
self.briefinggen.append_frequency("AWACS", "233 MHz AM")
callsign = "AWACS"
freq = "233 MHz AM"
self.briefinggen.append_frequency(callsign, freq)
kneeboard_generator.add_awacs(callsign, freq)
self.briefinggen.append_frequency("Flight", "251 MHz AM")
kneeboard_generator.add_comm("Flight", "251 MHz AM")
# Generate the briefing
self.briefinggen.generate()
for region, code, name in self.game.jtacs:
kneeboard_generator.add_jtac(name, region, code)
kneeboard_generator.generate()