Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2024-04-27 17:29:41 +02:00
commit 38c19b1442
2 changed files with 25 additions and 0 deletions

View File

@ -47,6 +47,7 @@ jobs:
- name: Update apt-get (needed for act docker image)
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -qq update
- name: Install tree

View File

@ -40,6 +40,7 @@
-- @field #number coalition Coalition ID.
-- @field #number country Country ID.
-- @field DCS#Desc desc Descriptor table.
-- @field DCS#Desc guidance Missile guidance descriptor.
-- @field DCS#Unit launcher Launcher DCS unit.
-- @field Wrapper.Unit#UNIT launcherUnit 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
self.categoryMissile=self.desc.missileCategory
if self.desc.guidance then
self.guidance = self.desc.guidance
end
end
-- Get type name.
@ -667,6 +671,26 @@ function WEAPON:IsTorpedo()
return self.category==Weapon.Category.TORPEDO
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.
-- @param #WEAPON self