Show the status of each flight in the UI.

https://github.com/dcs-liberation/dcs_liberation/issues/1704
This commit is contained in:
Dan Albert
2021-11-07 01:24:49 -07:00
parent 30cfd8a769
commit d31f0e22e3
15 changed files with 99 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from gen.flights.traveltime import TotEstimator
from .flightstate import FlightState
from ..starttype import StartType
@@ -15,3 +16,9 @@ class Uninitialized(FlightState):
@property
def spawn_type(self) -> StartType:
raise RuntimeError("Attempted to simulate flight that is not fully initialized")
@property
def description(self) -> str:
estimator = TotEstimator(self.flight.package)
delay = estimator.mission_start_time(self.flight)
return f"Starting in {delay}"