Fix common cases of kneeboard overflow.

This commit is contained in:
Dan Albert 2021-05-20 16:57:35 -07:00
parent 1c32ae1227
commit 102544877d
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@ Saves from 2.5 are not compatible with 3.0.
* **[Campaign AI]** AI now considers Ju-88s for CAS, strike, and DEAD missions.
* **[Campaign AI]** Fix purchase of aircraft by priority (the faction's list was being used as the priority list rather than the game's).
* **[Flight Planner]** AI strike flight plans now include the correct target actions for building groups.
* **[Kneeboard]** ATC table overflow alleviated by wrapping long airfield names and splitting ATC frequency and channel into separate rows.
* **[UI]** Added new web based map UI. This is mostly functional but many of the old display options are a WIP. Revert to the old map with --old-map.
* **[UI]** Campaigns generated for an older or newer version of the game will now be marked as incompatible. They can still be played, but bugs may be present.
* **[UI]** DCS loadouts are now selectable in the loadout setup menu.

View File

@ -23,6 +23,7 @@ only be added per airframe, so PvP missions where each side have the same
aircraft will be able to see the enemy's kneeboard for the same airframe.
"""
import datetime
import textwrap
from collections import defaultdict
from dataclasses import dataclass
from pathlib import Path
@ -335,7 +336,7 @@ class BriefingPage(KneeboardPage):
ils = ""
return [
row_title,
runway.airfield_name,
"\n".join(textwrap.wrap(runway.airfield_name, width=24)),
atc,
tacan,
ils,
@ -349,7 +350,7 @@ class BriefingPage(KneeboardPage):
namer = AIRCRAFT_DATA[self.flight.aircraft_type.id].channel_namer
channel_name = namer.channel_name(channel.radio_id, channel.channel)
return f"{channel_name} {frequency}"
return f"{channel_name}\n{frequency}"
class SupportPage(KneeboardPage):