mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#AIRWING, #EASYGCICAP
* Added SetCapStartTimeVariation()
This commit is contained in:
parent
056b761ebc
commit
4076ff5bb5
@ -56,6 +56,8 @@
|
|||||||
-- @field #boolean despawnAfterHolding Aircraft are despawned after holding.
|
-- @field #boolean despawnAfterHolding Aircraft are despawned after holding.
|
||||||
-- @field #boolean capOptionPatrolRaceTrack Use closer patrol race track or standard orbit auftrag.
|
-- @field #boolean capOptionPatrolRaceTrack Use closer patrol race track or standard orbit auftrag.
|
||||||
-- @field #number capFormation If capOptionPatrolRaceTrack is true, set the formation, also.
|
-- @field #number capFormation If capOptionPatrolRaceTrack is true, set the formation, also.
|
||||||
|
-- @field #number capOptionVaryStartTime If set, vary mission start time for CAP missions generated random between capOptionVaryStartTime and capOptionVaryEndTime
|
||||||
|
-- @field #number capOptionVaryEndTime If set, vary mission start time for CAP missions generated random between capOptionVaryStartTime and capOptionVaryEndTime
|
||||||
--
|
--
|
||||||
-- @extends Ops.Legion#LEGION
|
-- @extends Ops.Legion#LEGION
|
||||||
|
|
||||||
@ -132,6 +134,8 @@ AIRWING = {
|
|||||||
markpoints = false,
|
markpoints = false,
|
||||||
capOptionPatrolRaceTrack = false,
|
capOptionPatrolRaceTrack = false,
|
||||||
capFormation = nil,
|
capFormation = nil,
|
||||||
|
capOptionVaryStartTime = nil,
|
||||||
|
capOptionVaryEndTime = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Payload data.
|
--- Payload data.
|
||||||
@ -183,7 +187,7 @@ AIRWING = {
|
|||||||
|
|
||||||
--- AIRWING class version.
|
--- AIRWING class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AIRWING.version="0.9.4"
|
AIRWING.version="0.9.5"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@ -721,6 +725,17 @@ function AIRWING:SetCapCloseRaceTrack(OnOff)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set CAP mission start to vary randomly between Start end End seconds.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @param #number Start
|
||||||
|
-- @param #number End
|
||||||
|
-- @return #AIRWING self
|
||||||
|
function AIRWING:SetCapStartTimeVariation(Start, End)
|
||||||
|
self.capOptionVaryStartTime = Start or 5
|
||||||
|
self.capOptionVaryEndTime = End or 60
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Set number of TANKER flights with Boom constantly in the air.
|
--- Set number of TANKER flights with Boom constantly in the air.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
-- @param #number Nboom Number of flights. Default 1.
|
-- @param #number Nboom Number of flights. Default 1.
|
||||||
@ -1165,6 +1180,14 @@ function AIRWING:CheckCAP()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.capOptionVaryStartTime then
|
||||||
|
|
||||||
|
local ClockStart = math.random(self.capOptionVaryStartTime, self.capOptionVaryEndTime)
|
||||||
|
|
||||||
|
missionCAP:SetTime(ClockStart)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
missionCAP.patroldata=patrol
|
missionCAP.patroldata=patrol
|
||||||
|
|
||||||
patrol.noccupied=patrol.noccupied+1
|
patrol.noccupied=patrol.noccupied+1
|
||||||
|
|||||||
@ -458,6 +458,17 @@ function EASYGCICAP:SetDefaultOverhead(Overhead)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set CAP mission start to vary randomly between Start end End seconds.
|
||||||
|
-- @param #EASYGCICAP self
|
||||||
|
-- @param #number Start
|
||||||
|
-- @param #number End
|
||||||
|
-- @return #EASYGCICAP self
|
||||||
|
function EASYGCICAP:SetCapStartTimeVariation(Start, End)
|
||||||
|
self.capOptionVaryStartTime = Start or 5
|
||||||
|
self.capOptionVaryEndTime = End or 60
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Add an AirWing to the manager
|
--- Add an AirWing to the manager
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #string Airbasename
|
-- @param #string Airbasename
|
||||||
@ -511,6 +522,11 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
CAP_Wing:SetRespawnAfterDestroyed()
|
CAP_Wing:SetRespawnAfterDestroyed()
|
||||||
CAP_Wing:SetNumberCAP(self.capgrouping)
|
CAP_Wing:SetNumberCAP(self.capgrouping)
|
||||||
CAP_Wing:SetCapCloseRaceTrack(true)
|
CAP_Wing:SetCapCloseRaceTrack(true)
|
||||||
|
|
||||||
|
if self.capOptionVaryStartTime then
|
||||||
|
CAP_Wing:SetCapStartTimeVariation(self.capOptionVaryStartTime,self.capOptionVaryEndTime)
|
||||||
|
end
|
||||||
|
|
||||||
if CapFormation then
|
if CapFormation then
|
||||||
CAP_Wing:SetCAPFormation(CapFormation)
|
CAP_Wing:SetCAPFormation(CapFormation)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user