mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Recovery tanker
This commit is contained in:
parent
3a907ec7c2
commit
02dad179cd
@ -407,6 +407,7 @@ _AUFTRAGSNR=0
|
||||
-- @field #string RELOCATECOHORT Relocate a cohort from one legion to another.
|
||||
-- @field #string AIRDEFENSE Air defense.
|
||||
-- @field #string EWR Early Warning Radar.
|
||||
-- @field #string RECOVERYTANKER Recovery tanker.
|
||||
-- @field #string NOTHING Nothing.
|
||||
AUFTRAG.Type={
|
||||
ANTISHIP="Anti Ship",
|
||||
@ -447,6 +448,7 @@ AUFTRAG.Type={
|
||||
RELOCATECOHORT="Relocate Cohort",
|
||||
AIRDEFENSE="Air Defence",
|
||||
EWR="Early Warning Radar",
|
||||
RECOVERYTANKER="Recovery Tanker",
|
||||
NOTHING="Nothing",
|
||||
}
|
||||
|
||||
@ -466,6 +468,8 @@ AUFTRAG.Type={
|
||||
-- @field #string FERRY Ferry mission.
|
||||
-- @field #string RELOCATECOHORT Relocate cohort.
|
||||
-- @field #string AIRDEFENSE Air defense.
|
||||
-- @field #string EWR Early Warning Radar.
|
||||
-- @field #string RECOVERYTANKER Recovery tanker.
|
||||
-- @field #string NOTHING Nothing.
|
||||
AUFTRAG.SpecialTask={
|
||||
FORMATION="Formation",
|
||||
@ -484,6 +488,7 @@ AUFTRAG.SpecialTask={
|
||||
RELOCATECOHORT="Relocate Cohort",
|
||||
AIRDEFENSE="Air Defense",
|
||||
EWR="Early Warning Radar",
|
||||
RECOVERYTANKER="Recovery Tanker",
|
||||
NOTHING="Nothing",
|
||||
}
|
||||
|
||||
@ -1610,6 +1615,29 @@ function AUFTRAG:NewRESCUEHELO(Carrier)
|
||||
return mission
|
||||
end
|
||||
|
||||
--- **[AIRPANE]** Create a RECOVERY TANKER mission.
|
||||
-- @param #AUFTRAG self
|
||||
-- @param Wrapper.Unit#UNIT Carrier The carrier unit.
|
||||
-- @return #AUFTRAG self
|
||||
function AUFTRAG:NewRECOVERYTANKER(Carrier)
|
||||
|
||||
local mission=AUFTRAG:New(AUFTRAG.Type.RECOVERYTANKER)
|
||||
|
||||
mission:_TargetFromObject(Carrier)
|
||||
|
||||
-- Mission options:
|
||||
mission.missionTask=ENUMS.MissionTask.REFUELING
|
||||
mission.missionFraction=0.5
|
||||
mission.optionROE=ENUMS.ROE.WeaponHold
|
||||
mission.optionROT=ENUMS.ROT.NoReaction
|
||||
|
||||
mission.categories={AUFTRAG.Category.AIRPLANE}
|
||||
|
||||
mission.DCStask=mission:GetDCSMissionTask()
|
||||
|
||||
return mission
|
||||
end
|
||||
|
||||
|
||||
--- **[AIR ROTARY, GROUND]** Create a TROOP TRANSPORT mission.
|
||||
-- @param #AUFTRAG self
|
||||
@ -5208,6 +5236,36 @@ function AUFTRAG:GetDCSMissionTask(TaskControllable)
|
||||
|
||||
table.insert(DCStasks, DCStask)
|
||||
|
||||
elseif self.type==AUFTRAG.Type.RECOVERYTANKER then
|
||||
|
||||
|
||||
--[[
|
||||
local DCStask={}
|
||||
|
||||
DCStask.id=AUFTRAG.SpecialTask.RECOVERYTANKER
|
||||
|
||||
-- We create a "fake" DCS task.
|
||||
local param={}
|
||||
DCStask.params=param
|
||||
|
||||
]]
|
||||
|
||||
local Carrier=self:GetObjective() --Wrapper.Unit#UNIT
|
||||
|
||||
local heading=Carrier:GetHeading()
|
||||
|
||||
local Altitude=2000
|
||||
|
||||
local Coordinate=Carrier:GetCoordinate():SetAltitude(2000)
|
||||
|
||||
local RaceTrack=Coordinate:Translate(1000, heading, true)
|
||||
|
||||
local DCStask=CONTROLLABLE.TaskOrbit(nil, Coordinate, Altitude, 300, RaceTrack)
|
||||
|
||||
DCStask.params.carrier=Carrier
|
||||
|
||||
table.insert(DCStasks, DCStask)
|
||||
|
||||
elseif self.type==AUFTRAG.Type.INTERCEPT then
|
||||
|
||||
-----------------------
|
||||
|
||||
@ -5138,6 +5138,16 @@ function OPSGROUP:RouteToMission(mission, delay)
|
||||
waypointcoord=self:GetCoordinate():GetIntermediateCoordinate(ToCoordinate, 0.05)
|
||||
end
|
||||
|
||||
elseif mission.type==AUFTRAG.Type.RECOVERYTANKER then
|
||||
---
|
||||
-- Recoverytanker
|
||||
---
|
||||
|
||||
-- Roughly go to the new legion.
|
||||
local CarrierCoordinate=mission.DCStask.params.carrier:GetCoordinate()
|
||||
|
||||
waypointcoord=CarrierCoordinate:Translate(5000, 90):SetAltitude(2000)
|
||||
|
||||
else
|
||||
---
|
||||
-- Default case
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user