Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dcs/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def __init__(self):
class RecoveryTanker(Task):
Id = "RecoveryTanker"

def __init__(self, groupId: int, speed: float, altitude: float, lastWaypoint: Optional[int]):
def __init__(self, groupId=None, speed=600, altitude=4000, lastWaypoint: Optional[int] = None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete the type annotations. You've changed this signature from float to int here.

super(RecoveryTanker, self).__init__(RecoveryTanker.Id)

speedEdited = True
Expand All @@ -753,7 +753,6 @@ def __init__(self, groupId: int, speed: float, altitude: float, lastWaypoint: Op

self.params = {
"speedEdited": speedEdited,
"groupId": groupId,
"altitudeEdited": altitudeEdited,
"altitude": altitude,
"targetTypes": {
Expand All @@ -764,6 +763,8 @@ def __init__(self, groupId: int, speed: float, altitude: float, lastWaypoint: Op
"lastWptIndexFlagChangedManually": lastWptIndexChangedManually,
"lastWptIndex": lastWaypoint,
}
if groupId is not None:
self.params["groupId"] = groupId


class OrbitAction(Task):
Expand Down Expand Up @@ -1129,6 +1130,7 @@ def __init__(self, alt_above: int = DEFAULT_ALT,
AWACSTaskAction.Id: AWACSTaskAction,
RefuelingTaskAction.Id: RefuelingTaskAction,
Tanker.Id: Tanker,
RecoveryTanker.Id: RecoveryTanker,
OrbitAction.Id: OrbitAction,
Follow.Id: Follow,
Aerobatics.Id: Aerobatics,
Expand Down