mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Scenery
This commit is contained in:
parent
694ad5d33d
commit
0b3aea2bf3
@ -555,7 +555,7 @@ function ZONE_BASE:GetZoneMaybe()
|
||||
end
|
||||
end
|
||||
|
||||
-- Returns the Value of the zone with the given PropertyName, or nil if no matching property exists.
|
||||
--- Returns the Value of the zone with the given PropertyName, or nil if no matching property exists.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @param #string PropertyName The name of a the TriggerZone Property to be retrieved.
|
||||
-- @return #string The Value of the TriggerZone Property with the given PropertyName, or nil if absent.
|
||||
@ -569,7 +569,7 @@ function ZONE_BASE:GetProperty(PropertyName)
|
||||
return self.Properties[PropertyName]
|
||||
end
|
||||
|
||||
-- Returns the zone Properties table.
|
||||
--- Returns the zone Properties table.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @return #table The Key:Value table of TriggerZone properties of the zone.
|
||||
function ZONE_BASE:GetAllProperties()
|
||||
|
||||
@ -1530,7 +1530,7 @@ end
|
||||
|
||||
--- Add a unit or static object as bombing target.
|
||||
-- @param #RANGE self
|
||||
-- @param Wrapper.Positionable#POSITIONABLE unit Positionable (unit or static) of the strafe target.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE unit Positionable (unit or static) of the bombing target.
|
||||
-- @param #number goodhitrange Max distance from unit which is considered as a good hit.
|
||||
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
|
||||
-- @return #RANGE self
|
||||
|
||||
@ -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".
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user