mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Show patrol end time on the kneeboard.
Fixed https://github.com/Khopa/dcs_liberation/issues/421
This commit is contained in:
parent
e0223ded54
commit
b5ff32c5b6
@ -1404,6 +1404,7 @@ class PydcsWaypointBuilder:
|
|||||||
FlightWaypointType.JOIN: JoinPointBuilder,
|
FlightWaypointType.JOIN: JoinPointBuilder,
|
||||||
FlightWaypointType.LANDING_POINT: LandingPointBuilder,
|
FlightWaypointType.LANDING_POINT: LandingPointBuilder,
|
||||||
FlightWaypointType.LOITER: HoldPointBuilder,
|
FlightWaypointType.LOITER: HoldPointBuilder,
|
||||||
|
FlightWaypointType.PATROL: RaceTrackEndBuilder,
|
||||||
FlightWaypointType.PATROL_TRACK: RaceTrackBuilder,
|
FlightWaypointType.PATROL_TRACK: RaceTrackBuilder,
|
||||||
}
|
}
|
||||||
builder = builders.get(waypoint.waypoint_type, DefaultWaypointBuilder)
|
builder = builders.get(waypoint.waypoint_type, DefaultWaypointBuilder)
|
||||||
@ -1761,3 +1762,18 @@ class RaceTrackBuilder(PydcsWaypointBuilder):
|
|||||||
targets=[Targets.All.Air]))
|
targets=[Targets.All.Air]))
|
||||||
|
|
||||||
return waypoint
|
return waypoint
|
||||||
|
|
||||||
|
|
||||||
|
class RaceTrackEndBuilder(PydcsWaypointBuilder):
|
||||||
|
def build(self) -> MovingPoint:
|
||||||
|
waypoint = super().build()
|
||||||
|
|
||||||
|
if not isinstance(self.flight.flight_plan, PatrollingFlightPlan):
|
||||||
|
flight_plan_type = self.flight.flight_plan.__class__.__name__
|
||||||
|
logging.error(
|
||||||
|
f"Cannot create race track for {self.flight} because "
|
||||||
|
f"{flight_plan_type} does not define a patrol.")
|
||||||
|
return waypoint
|
||||||
|
|
||||||
|
self.waypoint.departure_time = self.flight.flight_plan.patrol_end_time
|
||||||
|
return waypoint
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user