This commit is contained in:
Applevangelist
2023-07-29 16:02:42 +02:00
parent 5c2b77cf76
commit 3b2850e042
3 changed files with 374 additions and 7 deletions

View File

@@ -735,6 +735,26 @@ function COMMANDER:AddAwacsZone(Zone, Altitude, Speed, Heading, Leg)
return awacszone
end
--- Remove a AWACS zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone Zone, where the flight orbits.
function COMMANDER:RemoveAwacsZone(Zone)
local awacszone={} --Ops.AirWing#AIRWING.PatrolZone
awacszone.zone=Zone
for i,_awacszone in pairs(self.awacsZones) do
if _awacszone.zone == awacszone.zone then
if _awacszone.mission and _awacszone.mission:IsNotOver() then
_awacszone.mission:Cancel()
end
table.remove(self.awacsZones, i)
break
end
end
return awacszone
end
--- Add a refuelling tanker zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone Zone.
@@ -762,6 +782,26 @@ function COMMANDER:AddTankerZone(Zone, Altitude, Speed, Heading, Leg, RefuelSyst
return tankerzone
end
--- Remove a refuelling tanker zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone Zone, where the flight orbits.
function COMMANDER:RemoveTankerZone(Zone)
local tankerzone={} --Ops.AirWing#AIRWING.PatrolZone
tankerzone.zone=Zone
for i,_tankerzone in pairs(self.tankerZones) do
if _tankerzone.zone == tankerzone.zone then
if _tankerzone.mission and _tankerzone.mission:IsNotOver() then
_tankerzone.mission:Cancel()
end
table.remove(self.tankerZones, i)
break
end
end
return tankerzone
end
--- Check if this mission is already in the queue.
-- @param #COMMANDER self
-- @param Ops.Auftrag#AUFTRAG Mission The mission.