mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add bullseye to the kneeboard.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/136
This commit is contained in:
parent
a382e74a89
commit
2f6c04a86d
@ -38,6 +38,7 @@ from tabulate import tabulate
|
||||
from game.data.alic import AlicCodes
|
||||
from game.db import find_unittype, unit_type_from_name
|
||||
from game.theater import ConflictTheater, TheaterGroundObject, LatLon
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.utils import meters
|
||||
from .aircraft import AIRCRAFT_DATA, FlightData
|
||||
from .airsupportgen import AwacsInfo, TankerInfo
|
||||
@ -258,10 +259,14 @@ class BriefingPage(KneeboardPage):
|
||||
def __init__(
|
||||
self,
|
||||
flight: FlightData,
|
||||
bullseye: Bullseye,
|
||||
theater: ConflictTheater,
|
||||
start_time: datetime.datetime,
|
||||
dark_kneeboard: bool,
|
||||
) -> None:
|
||||
self.flight = flight
|
||||
self.bullseye = bullseye
|
||||
self.theater = theater
|
||||
self.start_time = start_time
|
||||
self.dark_kneeboard = dark_kneeboard
|
||||
|
||||
@ -293,6 +298,10 @@ class BriefingPage(KneeboardPage):
|
||||
headers=["#", "Action", "Alt", "Dist", "GSPD", "Time", "Departure"],
|
||||
)
|
||||
|
||||
writer.text(
|
||||
f"Bullseye: {self.format_ll(self.bullseye.to_lat_lon(self.theater))}"
|
||||
)
|
||||
|
||||
writer.table(
|
||||
[
|
||||
[
|
||||
@ -591,7 +600,13 @@ class KneeboardGenerator(MissionInfoGenerator):
|
||||
def generate_flight_kneeboard(self, flight: FlightData) -> List[KneeboardPage]:
|
||||
"""Returns a list of kneeboard pages for the given flight."""
|
||||
pages: List[KneeboardPage] = [
|
||||
BriefingPage(flight, self.mission.start_time, self.dark_kneeboard),
|
||||
BriefingPage(
|
||||
flight,
|
||||
self.game.bullseye_for(flight.friendly),
|
||||
self.game.theater,
|
||||
self.mission.start_time,
|
||||
self.dark_kneeboard,
|
||||
),
|
||||
SupportPage(
|
||||
flight,
|
||||
self.comms,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user