mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress on AI_CARGO_TROOPS
This commit is contained in:
@@ -239,14 +239,17 @@ end
|
||||
-- Note that this destroy method also raises a destroy event at run-time.
|
||||
-- So all event listeners will catch the destroy event of this DCS Group.
|
||||
-- @param #GROUP self
|
||||
function GROUP:Destroy()
|
||||
-- @param #boolean GenerateEvent
|
||||
function GROUP:Destroy( GenerateEvent )
|
||||
self:F2( self.GroupName )
|
||||
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
|
||||
if DCSGroup then
|
||||
for Index, UnitData in pairs( DCSGroup:getUnits() ) do
|
||||
self:CreateEventCrash( timer.getTime(), UnitData )
|
||||
if not GenerateEvent then
|
||||
for Index, UnitData in pairs( DCSGroup:getUnits() ) do
|
||||
self:CreateEventCrash( timer.getTime(), UnitData )
|
||||
end
|
||||
end
|
||||
USERFLAG:New( self:GetName() ):Set( 100 )
|
||||
DCSGroup:destroy()
|
||||
|
||||
@@ -229,6 +229,26 @@ function IDENTIFIABLE:GetDesc()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Check if the Object has the attribute.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @param #string AttributeName The attribute name.
|
||||
-- @return #boolean true if the attribute exists.
|
||||
-- @return #nil The DCS Identifiable is not existing or alive.
|
||||
function IDENTIFIABLE:HasAttribute( AttributeName )
|
||||
self:F2( self.IdentifiableName )
|
||||
|
||||
local DCSIdentifiable = self:GetDCSObject()
|
||||
|
||||
if DCSIdentifiable then
|
||||
local IdentifiableHasAttribute = DCSIdentifiable:hasAttribute( AttributeName )
|
||||
self:T2( IdentifiableHasAttribute )
|
||||
return IdentifiableHasAttribute
|
||||
end
|
||||
|
||||
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Gets the CallSign of the IDENTIFIABLE, which is a blank by default.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #string The CallSign of the IDENTIFIABLE.
|
||||
|
||||
@@ -91,3 +91,5 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user