This commit is contained in:
Frank
2020-03-08 00:35:06 +01:00
parent dc7c50b97b
commit 59603e3027
4 changed files with 138 additions and 86 deletions
+23 -2
View File
@@ -703,6 +703,12 @@ end
-- @param #string status New status.
function AUFTRAG:SetFlightStatus(flightgroup, status)
self.flightdata[flightgroup.groupname].status=status
-- Check if ALL flights are done with their mission.
if self:IsNotOver() and self:CheckFlightsDone() then
self:Done()
end
end
--- Get flightgroup mission status.
@@ -907,7 +913,7 @@ end
--- Add asset to mission.
-- @param #AUFTRAG self
-- @param Ops.AirWing#AIRWING.SquadronAsset Asset The asset to be added to the mission.
-- @return #AIRWING self
-- @return #AUFTRAG self
function AUFTRAG:AddAsset(Asset)
self.assets=self.assets or {}
@@ -920,7 +926,7 @@ end
--- Delete asset from mission.
-- @param #AUFTRAG self
-- @param Ops.AirWing#AIRWING.SquadronAsset Asset The asset to be removed.
-- @return #AIRWING self
-- @return #AUFTRAG self
function AUFTRAG:DelAsset(Asset)
for i,_asset in pairs(self.assets or {}) do
@@ -928,10 +934,12 @@ function AUFTRAG:DelAsset(Asset)
if asset.uid==Asset.uid then
table.remove(self.assets, i)
return self
end
end
return self
end
@@ -1006,6 +1014,19 @@ function AUFTRAG:GetTargetCoordinate()
return nil
end
--- Get coordinate of target. First unit/group of the set is used.
-- @param #AUFTRAG self
-- @return #string
function AUFTRAG:GetMissionTypesText(MissionTypes)
local text=""
for _,missiontype in pairs(MissionTypes) do
text=text..string.format("%s, ", missiontype)
end
return text
end
--- Get DCS task table for the given mission.
-- @param #AUFTRAG self
-- @return DCS#Task The DCS task table. If multiple tasks are necessary, this is returned as a combo task.