mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#WEAPON - Added IsFoxOne().. IsFoxThree()
This commit is contained in:
parent
f9dcc9d95c
commit
d3419d218a
@ -40,6 +40,7 @@
|
|||||||
-- @field #number coalition Coalition ID.
|
-- @field #number coalition Coalition ID.
|
||||||
-- @field #number country Country ID.
|
-- @field #number country Country ID.
|
||||||
-- @field DCS#Desc desc Descriptor table.
|
-- @field DCS#Desc desc Descriptor table.
|
||||||
|
-- @field DCS#Desc guidance Missile guidance descriptor.
|
||||||
-- @field DCS#Unit launcher Launcher DCS unit.
|
-- @field DCS#Unit launcher Launcher DCS unit.
|
||||||
-- @field Wrapper.Unit#UNIT launcherUnit Launcher Unit.
|
-- @field Wrapper.Unit#UNIT launcherUnit Launcher Unit.
|
||||||
-- @field #string launcherName Name of launcher unit.
|
-- @field #string launcherName Name of launcher unit.
|
||||||
@ -196,6 +197,9 @@ function WEAPON:New(WeaponObject)
|
|||||||
|
|
||||||
if self:IsMissile() and self.desc.missileCategory then
|
if self:IsMissile() and self.desc.missileCategory then
|
||||||
self.categoryMissile=self.desc.missileCategory
|
self.categoryMissile=self.desc.missileCategory
|
||||||
|
if self.desc.guidance then
|
||||||
|
self.guidance = self.desc.guidance
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get type name.
|
-- Get type name.
|
||||||
@ -667,6 +671,26 @@ function WEAPON:IsTorpedo()
|
|||||||
return self.category==Weapon.Category.TORPEDO
|
return self.category==Weapon.Category.TORPEDO
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Check if weapon is a Fox One missile (Radar Semi-Active).
|
||||||
|
-- @param #WEAPON self
|
||||||
|
-- @return #boolean If `true`, is a Fox One.
|
||||||
|
function WEAPON:IsFoxOne()
|
||||||
|
return self.guidance==Weapon.GuidanceType.RADAR_SEMI_ACTIVE
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Check if weapon is a Fox Two missile (IR guided).
|
||||||
|
-- @param #WEAPON self
|
||||||
|
-- @return #boolean If `true`, is a Fox Two.
|
||||||
|
function WEAPON:IsFoxTwo()
|
||||||
|
return self.guidance==Weapon.GuidanceType.IR
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Check if weapon is a Fox Three missile (Radar Active).
|
||||||
|
-- @param #WEAPON self
|
||||||
|
-- @return #boolean If `true`, is a Fox Three.
|
||||||
|
function WEAPON:IsFoxThree()
|
||||||
|
return self.guidance==Weapon.GuidanceType.RADAR_ACTIVE
|
||||||
|
end
|
||||||
|
|
||||||
--- Destroy the weapon object.
|
--- Destroy the weapon object.
|
||||||
-- @param #WEAPON self
|
-- @param #WEAPON self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user