mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AUFTRAG, #OPSGROUP - close issue #2201
This commit is contained in:
@@ -2324,8 +2324,9 @@ end
|
|||||||
-- @param #number Speed Speed in knots.
|
-- @param #number Speed Speed in knots.
|
||||||
-- @param #number Altitude Altitude in feet. Only for airborne units. Default 2000 feet ASL.
|
-- @param #number Altitude Altitude in feet. Only for airborne units. Default 2000 feet ASL.
|
||||||
-- @param #string Formation Formation used by ground units during patrol. Default "Off Road".
|
-- @param #string Formation Formation used by ground units during patrol. Default "Off Road".
|
||||||
|
-- @param #number StayInZoneTime Stay this many seconds in the zone when done, only then drive back.
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewCAPTUREZONE(OpsZone, Coalition, Speed, Altitude, Formation)
|
function AUFTRAG:NewCAPTUREZONE(OpsZone, Coalition, Speed, Altitude, Formation, StayInZoneTime)
|
||||||
|
|
||||||
local mission=AUFTRAG:New(AUFTRAG.Type.CAPTUREZONE)
|
local mission=AUFTRAG:New(AUFTRAG.Type.CAPTUREZONE)
|
||||||
|
|
||||||
@@ -2339,6 +2340,7 @@ function AUFTRAG:NewCAPTUREZONE(OpsZone, Coalition, Speed, Altitude, Formation)
|
|||||||
mission.optionROE=ENUMS.ROE.ReturnFire
|
mission.optionROE=ENUMS.ROE.ReturnFire
|
||||||
mission.optionROT=ENUMS.ROT.PassiveDefense
|
mission.optionROT=ENUMS.ROT.PassiveDefense
|
||||||
mission.optionAlarm=ENUMS.AlarmState.Auto
|
mission.optionAlarm=ENUMS.AlarmState.Auto
|
||||||
|
mission.StayInZoneTime = StayInZoneTime
|
||||||
|
|
||||||
mission.missionFraction=0.1
|
mission.missionFraction=0.1
|
||||||
mission.missionSpeed=Speed and UTILS.KnotsToKmph(Speed) or nil
|
mission.missionSpeed=Speed and UTILS.KnotsToKmph(Speed) or nil
|
||||||
|
|||||||
@@ -4631,7 +4631,12 @@ function OPSGROUP:_UpdateTask(Task, Mission)
|
|||||||
self:T(self.lid..string.format("Zone %s captured ==> Task DONE!", zoneCurr:GetName()))
|
self:T(self.lid..string.format("Zone %s captured ==> Task DONE!", zoneCurr:GetName()))
|
||||||
|
|
||||||
-- Task done.
|
-- Task done.
|
||||||
self:TaskDone(Task)
|
if Task.StayInZoneTime then
|
||||||
|
local stay = Task.StayInZoneTime
|
||||||
|
self:__TaskDone(stay,Task)
|
||||||
|
else
|
||||||
|
self:TaskDone(Task)
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
-- Current zone NOT captured yet ==> Find Target
|
-- Current zone NOT captured yet ==> Find Target
|
||||||
|
|||||||
Reference in New Issue
Block a user