FIFO - FIFO:HasUniqueID(UniqueID)

GROUP - added GROUP:IsPlayer()
INTEL - added clustering by flight deck (10'k ft) for AIR
SET - added option to NOT set the cargo bay weight limit automatically on SET_GROUP:AddGroup( group, DontSetCargoBayLimit )
This commit is contained in:
Applevangelist
2022-05-02 17:18:29 +02:00
parent f725709e5b
commit bc03eb2e65
5 changed files with 165 additions and 34 deletions

View File

@@ -667,6 +667,29 @@ function GROUP:GetPlayerUnits()
return nil
end
--- Check if an (air) group is a client or player slot. Information is retrieved from the group template.
-- @param #GROUP self
-- @return #boolean If true, group is associated with a client or player slot.
function GROUP:IsPlayer()
-- Get group.
-- local group=self:GetGroup()
-- Units of template group.
local units=self:GetTemplate().units
-- Get numbers.
for _,unit in pairs(units) do
-- Check if unit name matach and skill is Client or Player.
if unit.name==self:GetName() and (unit.skill=="Client" or unit.skill=="Player") then
return true
end
end
return false
end
--- Returns the UNIT wrapper class with number UnitNumber.
-- If the underlying DCS Unit does not exist, the method will return nil. .