mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 17:07:54 +00:00
AWACS allow startasgci to process a string instead of a GROUP
This commit is contained in:
@@ -1164,14 +1164,18 @@ end
|
|||||||
|
|
||||||
--- [User] Start this instance and act as GCI Ground Controlled Intercepts Operator
|
--- [User] Start this instance and act as GCI Ground Controlled Intercepts Operator
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @param #string EWR The **main** Early Warning Radar (EWR) group name for this GCI.
|
-- @param Wrapper.Group#GROUP EWR The **main** Early Warning Radar (EWR) GROUP object for this GCI.
|
||||||
-- @param #number Delay (option) Start after this many seconds (optional).
|
-- @param #number Delay (option) Start after this many seconds (optional).
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:StartAsGCI(EWR,Delay)
|
function AWACS:StartAsGCI(EWR,Delay)
|
||||||
self:T(self.lid.."SetGCI")
|
self:T(self.lid.."SetGCI")
|
||||||
local delay = Delay or -5
|
local delay = Delay or -5
|
||||||
|
if type(EWR) == "string" then
|
||||||
|
self.GCIGroup = GROUP:FindByName(EWR)
|
||||||
|
else
|
||||||
|
self.GCIGroup = EWR
|
||||||
|
end
|
||||||
self.GCI = true
|
self.GCI = true
|
||||||
self.GCIGroup = EWR
|
|
||||||
self:SetEscort(0)
|
self:SetEscort(0)
|
||||||
self:__Start(delay)
|
self:__Start(delay)
|
||||||
-- set FSM to started
|
-- set FSM to started
|
||||||
|
|||||||
Reference in New Issue
Block a user