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

This commit is contained in:
Applevangelist
2023-02-23 10:20:22 +01:00
19 changed files with 1089 additions and 927 deletions

View File

@@ -1768,6 +1768,7 @@ do -- Cargo
["tt_DSHK"] = 6,
["HL_KORD"] = 6,
["HL_DSHK"] = 6,
["CCKW_353"] = 16, --GMC CCKW 2½-ton 6×6 truck, estimating 16 soldiers
}
-- Assuming that each passenger weighs 95 kg on average.

View File

@@ -4,7 +4,7 @@
--
-- ### Author: **FlightControl**
--
-- ### Contributions: **Applevangelist**
-- ### Contributions: **Applevangelist**, **funkyfranky**
--
-- ===
--
@@ -12,12 +12,12 @@
-- @image Wrapper_Scenery.JPG
--- @type SCENERY
-- @field #string ClassName
-- @field #string SceneryName
-- @field #DCS.Object SceneryObject
-- @field #number Life0
--- SCENERY Class
-- @type SCENERY
-- @field #string ClassName Name of the class.
-- @field #string SceneryName Name of the scenery object.
-- @field DCS#Object SceneryObject DCS scenery object.
-- @field #number Life0 Initial life points.
-- @extends Wrapper.Positionable#POSITIONABLE
@@ -37,12 +37,16 @@ SCENERY = {
--- Register scenery object as POSITIONABLE.
--@param #SCENERY self
--@param #string SceneryName Scenery name.
--@param #DCS.Object SceneryObject DCS scenery object.
--@param DCS#Object SceneryObject DCS scenery object.
--@return #SCENERY Scenery object.
function SCENERY:Register( SceneryName, SceneryObject )
local self = BASE:Inherit( self, POSITIONABLE:New( SceneryName ) )
self.SceneryName = SceneryName
self.SceneryObject = SceneryObject
if self.SceneryObject then
self.Life0 = self.SceneryObject:getLife()
else
@@ -53,7 +57,7 @@ end
--- Obtain DCS Object from the SCENERY Object.
--@param #SCENERY self
--@return #DCS.Object DCS scenery object.
--@return DCS#Object DCS scenery object.
function SCENERY:GetDCSObject()
return self.SceneryObject
end
@@ -69,7 +73,7 @@ function SCENERY:GetLife()
return life
end
--- Get current initial life points from the SCENERY Object.
--- Get initial life points of the SCENERY Object.
--@param #SCENERY self
--@return #number life
function SCENERY:GetLife0()
@@ -90,7 +94,7 @@ function SCENERY:IsDead()
return self:GetLife() < 1 and true or false
end
--- Get the threat level of a SCENERY object. Always 0.
--- Get the threat level of a SCENERY object. Always 0 as scenery does not pose a threat to anyone.
--@param #SCENERY self
--@return #number Threat level 0.
--@return #string "Scenery".

View File

@@ -167,7 +167,7 @@ end
--- Get the DCS unit object.
-- @param #UNIT self
-- @return DCS#Unit
-- @return DCS#Unit The DCS unit object.
function UNIT:GetDCSObject()
local DCSUnit = Unit.getByName( self.UnitName )