Also use Tanker task for recovery tankers.

DCS apparently needs both to function.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2771.
This commit is contained in:
zhexu14 2023-04-21 10:59:14 +10:00 committed by GitHub
parent 0d257a2c3b
commit 4bc8bf52e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
from dcs.point import MovingPoint
from dcs.task import ActivateBeaconCommand, RecoveryTanker
from dcs.task import ActivateBeaconCommand, RecoveryTanker, Tanker
from game.ato import FlightType
from game.utils import feet, knots
@ -10,6 +10,12 @@ class RecoveryTankerBuilder(PydcsWaypointBuilder):
def add_tasks(self, waypoint: MovingPoint) -> None:
assert self.flight.flight_type == FlightType.REFUELING
# Tanker task required in conjunction with RecoveryTanker task.
# See link below for details.
# https://github.com/dcs-liberation/dcs_liberation/issues/2771
waypoint.add_task(Tanker())
group_id = self._get_carrier_group_id()
speed = knots(250).meters_per_second
altitude = feet(6000).meters