mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Updated the Escort class
- Registering each excort at the client internally. - Each escort known at the client can exchange targets. - Each escort can acquire attack assistance from other escorts known at the client. - Made the MENU class more slick. Now menus are removed recursively for CLIENTS. - Added a few more types and fine tuned the documentation.
This commit is contained in:
@@ -49,6 +49,11 @@ UNIT = {
|
||||
-- @field Orange
|
||||
-- @field Blue
|
||||
|
||||
|
||||
--- Create a new UNIT from DCSUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param DCSUnit#Unit DCSUnit
|
||||
-- @return Unit#UNIT
|
||||
function UNIT:New( DCSUnit )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( DCSUnit:getName() )
|
||||
@@ -231,4 +236,21 @@ function UNIT:SmokeBlue()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.Blue )
|
||||
end
|
||||
|
||||
-- Is methods
|
||||
|
||||
--- Returns if the unit is of an air category.
|
||||
-- If the unit is a helicopter or a plane, then this method will return true, otherwise false.
|
||||
-- @param #UNIT self
|
||||
-- @return #boolean Air category evaluation result.
|
||||
function UNIT:IsAir()
|
||||
self:F()
|
||||
|
||||
local UnitDescriptor = self.DCSUnit:getDesc()
|
||||
self:T( { UnitDescriptor.category, Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
|
||||
local IsAirResult = ( UnitDescriptor.category == Unit.Category.AIRPLANE ) or ( UnitDescriptor.category == Unit.Category.HELICOPTER )
|
||||
|
||||
self:T( IsAirResult )
|
||||
return IsAirResult
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user