From 123db516ad7c454bdae11591d729cdf8112c98df Mon Sep 17 00:00:00 2001 From: RndName Date: Mon, 7 Nov 2022 21:28:12 +0100 Subject: [PATCH] Remove unneeded LandRefuel from Airlift --- game/ato/flightplans/airlift.py | 12 +--------- game/ato/flightplans/waypointbuilder.py | 32 ------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/game/ato/flightplans/airlift.py b/game/ato/flightplans/airlift.py index a99b0622..8a02cfef 100644 --- a/game/ato/flightplans/airlift.py +++ b/game/ato/flightplans/airlift.py @@ -129,16 +129,6 @@ class Builder(IBuilder[AirliftFlightPlan, AirliftLayout]): altitude_is_agl, ) - if self.flight.client_count > 0: - # Normal Landing Waypoint - arrival = builder.land(self.flight.arrival) - else: - # The AI Needs another landing&refuel point to actually fly back to the original - # base. Otherwise the Cargo drop will be the new Landing Waypoint and the - # AI will end its mission there instead of flying back. - # https://forum.dcs.world/topic/211775-landing-to-refuel-and-rearm-the-landingrefuar-waypoint/ - arrival = builder.land_refuel(self.flight.arrival, True) - return AirliftLayout( departure=builder.takeoff(self.flight.departure), nav_to_pickup=nav_to_pickup, @@ -158,7 +148,7 @@ class Builder(IBuilder[AirliftFlightPlan, AirliftLayout]): altitude, altitude_is_agl, ), - arrival=arrival, + arrival=builder.land(self.flight.arrival), divert=builder.divert(self.flight.divert), bullseye=builder.bullseye(), ) diff --git a/game/ato/flightplans/waypointbuilder.py b/game/ato/flightplans/waypointbuilder.py index 1e789740..03bc1eed 100644 --- a/game/ato/flightplans/waypointbuilder.py +++ b/game/ato/flightplans/waypointbuilder.py @@ -500,38 +500,6 @@ class WaypointBuilder: pretty_name="Target area", ) - @staticmethod - def land_refuel( - control_point: ControlPoint, is_destination: bool = False - ) -> FlightWaypoint: - """Creates a land refuel waypoint. - - Args: - control_point: The airbase to refuel. - is_destination: Due to an DCS Bug we need to set the last landing waypoint also as LandingReFuAr - """ - if is_destination: - return FlightWaypoint( - "LANDING", - FlightWaypointType.LAND_REFUEL, - control_point.position, - meters(0), - "RADIO", - description=f"Land at {control_point}", - pretty_name="Landing", - control_point=control_point, - ) - return FlightWaypoint( - "REFUEL", - FlightWaypointType.LAND_REFUEL, - control_point.position, - meters(0), - "RADIO", - description=f"Refuel at {control_point}", - pretty_name="Refuel", - control_point=control_point, - ) - @staticmethod def cargo_pickup(pick_up: MissionTarget, is_helo: bool) -> FlightWaypoint: """Creates a cargo pickup waypoint.