mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Format time for WPTs on map
This commit is contained in:
parent
84c9098dba
commit
22900407dd
@ -9,7 +9,7 @@ from game.server.leaflet import LeafletPoint
|
||||
|
||||
def timing_info(flight: Flight, waypoint_idx: int) -> str:
|
||||
if waypoint_idx == 0:
|
||||
return f"Depart T+{flight.flight_plan.takeoff_time()}"
|
||||
return f"Depart T+{flight.flight_plan.takeoff_time():%H:%M:%S}"
|
||||
|
||||
waypoint = flight.flight_plan.waypoints[waypoint_idx - 1]
|
||||
prefix = "TOT"
|
||||
@ -19,7 +19,7 @@ def timing_info(flight: Flight, waypoint_idx: int) -> str:
|
||||
time = flight.flight_plan.depart_time_for_waypoint(waypoint)
|
||||
if time is None:
|
||||
return ""
|
||||
return f"{prefix} {time}"
|
||||
return f"{prefix} {time:%H:%M:%S}"
|
||||
|
||||
|
||||
class FlightWaypointJs(BaseModel):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user