From 536341b6de770c127dcbb28952680a12288a09f5 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 9 Jul 2022 15:02:14 +0200 Subject: [PATCH] AWACS allow startasgci to process a string instead of a GROUP --- Moose Development/Moose/Ops/Awacs.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index 2eca9907e..604562acb 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -1164,14 +1164,18 @@ end --- [User] Start this instance and act as GCI Ground Controlled Intercepts Operator -- @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). -- @return #AWACS self function AWACS:StartAsGCI(EWR,Delay) self:T(self.lid.."SetGCI") local delay = Delay or -5 + if type(EWR) == "string" then + self.GCIGroup = GROUP:FindByName(EWR) + else + self.GCIGroup = EWR + end self.GCI = true - self.GCIGroup = EWR self:SetEscort(0) self:__Start(delay) -- set FSM to started