mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPSGROUP extra check
This commit is contained in:
parent
ef30bd36a5
commit
7c9cf96d2e
@ -508,7 +508,7 @@ OPSGROUP.CargoStatus={
|
|||||||
|
|
||||||
--- OpsGroup version.
|
--- OpsGroup version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
OPSGROUP.version="1.0.0"
|
OPSGROUP.version="1.0.1"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@ -554,11 +554,16 @@ function OPSGROUP:New(group)
|
|||||||
-- Check if group exists.
|
-- Check if group exists.
|
||||||
if self.group then
|
if self.group then
|
||||||
if not self:IsExist() then
|
if not self:IsExist() then
|
||||||
self:T(self.lid.."ERROR: GROUP does not exist! Returning nil")
|
self:E(self.lid.."ERROR: GROUP does not exist! Returning nil")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if UTILS.IsInstanceOf(group,"OPSGROUP") then
|
||||||
|
self:E(self.lid.."ERROR: GROUP is already an OPSGROUP: "..tostring(self.groupname).."!")
|
||||||
|
return group
|
||||||
|
end
|
||||||
|
|
||||||
-- Set the template.
|
-- Set the template.
|
||||||
self:_SetTemplate()
|
self:_SetTemplate()
|
||||||
|
|
||||||
@ -592,6 +597,7 @@ function OPSGROUP:New(group)
|
|||||||
if units then
|
if units then
|
||||||
local masterunit=units[1] --Wrapper.Unit#UNIT
|
local masterunit=units[1] --Wrapper.Unit#UNIT
|
||||||
|
|
||||||
|
if unit then
|
||||||
-- Get Descriptors.
|
-- Get Descriptors.
|
||||||
self.descriptors=masterunit:GetDesc()
|
self.descriptors=masterunit:GetDesc()
|
||||||
|
|
||||||
@ -617,7 +623,7 @@ function OPSGROUP:New(group)
|
|||||||
--env.info("DCS Unit PROBE_AND_DROGUE="..tostring(Unit.RefuelingSystem.PROBE_AND_DROGUE))
|
--env.info("DCS Unit PROBE_AND_DROGUE="..tostring(Unit.RefuelingSystem.PROBE_AND_DROGUE))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Init set of detected units.
|
-- Init set of detected units.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user