mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
** ARMYGROUP** - Added suppression option **COMMANDER** - Added function to add targets with defined resources **OPSGROUP** - Added option to pause multiple missions **INTEL** - Fixed bug in cluster calc **LEGION** - Added function to get alive opsgroups **TARGET** * Added start condition
This commit is contained in:
@@ -1543,6 +1543,33 @@ function DATABASE:FindOpsGroup(groupname)
|
||||
return self.FLIGHTGROUPS[groupname]
|
||||
end
|
||||
|
||||
--- Find an OPSGROUP (FLIGHTGROUP, ARMYGROUP, NAVYGROUP) in the data base for a given unit.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string unitname Unit name. Can also be passed as UNIT object.
|
||||
-- @return Ops.OpsGroup#OPSGROUP OPS group object.
|
||||
function DATABASE:FindOpsGroupFromUnit(unitname)
|
||||
|
||||
local unit=nil --Wrapper.Unit#UNIT
|
||||
local groupname
|
||||
|
||||
-- Get group and group name.
|
||||
if type(unitname)=="string" then
|
||||
unit=UNIT:FindByName(unitname)
|
||||
else
|
||||
unit=unitname
|
||||
end
|
||||
|
||||
if unit then
|
||||
groupname=unit:GetGroup():GetName()
|
||||
end
|
||||
|
||||
if groupname then
|
||||
return self.FLIGHTGROUPS[groupname]
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
--- Add a flight control to the data base.
|
||||
-- @param #DATABASE self
|
||||
-- @param Ops.FlightControl#FLIGHTCONTROL flightcontrol
|
||||
|
||||
Reference in New Issue
Block a user