mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Scenery
This commit is contained in:
@@ -555,7 +555,7 @@ function ZONE_BASE:GetZoneMaybe()
|
|||||||
end
|
end
|
||||||
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 #ZONE_BASE self
|
||||||
-- @param #string PropertyName The name of a the TriggerZone Property to be retrieved.
|
-- @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.
|
-- @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]
|
return self.Properties[PropertyName]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the zone Properties table.
|
--- Returns the zone Properties table.
|
||||||
-- @param #ZONE_BASE self
|
-- @param #ZONE_BASE self
|
||||||
-- @return #table The Key:Value table of TriggerZone properties of the zone.
|
-- @return #table The Key:Value table of TriggerZone properties of the zone.
|
||||||
function ZONE_BASE:GetAllProperties()
|
function ZONE_BASE:GetAllProperties()
|
||||||
|
|||||||
@@ -1530,7 +1530,7 @@ end
|
|||||||
|
|
||||||
--- Add a unit or static object as bombing target.
|
--- Add a unit or static object as bombing target.
|
||||||
-- @param #RANGE self
|
-- @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 #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.
|
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
|
||||||
-- @return #RANGE self
|
-- @return #RANGE self
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
--
|
--
|
||||||
-- ### Author: **FlightControl**
|
-- ### Author: **FlightControl**
|
||||||
--
|
--
|
||||||
-- ### Contributions: **Applevangelist**
|
-- ### Contributions: **Applevangelist**, **funkyfranky**
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
-- @image Wrapper_Scenery.JPG
|
-- @image Wrapper_Scenery.JPG
|
||||||
|
|
||||||
|
|
||||||
|
--- SCENERY Class
|
||||||
--- @type SCENERY
|
-- @type SCENERY
|
||||||
-- @field #string ClassName
|
-- @field #string ClassName Name of the class.
|
||||||
-- @field #string SceneryName
|
-- @field #string SceneryName Name of the scenery object.
|
||||||
-- @field #DCS.Object SceneryObject
|
-- @field DCS#Object SceneryObject DCS scenery object.
|
||||||
-- @field #number Life0
|
-- @field #number Life0 Initial life points.
|
||||||
-- @extends Wrapper.Positionable#POSITIONABLE
|
-- @extends Wrapper.Positionable#POSITIONABLE
|
||||||
|
|
||||||
|
|
||||||
@@ -37,12 +37,16 @@ SCENERY = {
|
|||||||
--- Register scenery object as POSITIONABLE.
|
--- Register scenery object as POSITIONABLE.
|
||||||
--@param #SCENERY self
|
--@param #SCENERY self
|
||||||
--@param #string SceneryName Scenery name.
|
--@param #string SceneryName Scenery name.
|
||||||
--@param #DCS.Object SceneryObject DCS scenery object.
|
--@param DCS#Object SceneryObject DCS scenery object.
|
||||||
--@return #SCENERY Scenery object.
|
--@return #SCENERY Scenery object.
|
||||||
function SCENERY:Register( SceneryName, SceneryObject )
|
function SCENERY:Register( SceneryName, SceneryObject )
|
||||||
|
|
||||||
local self = BASE:Inherit( self, POSITIONABLE:New( SceneryName ) )
|
local self = BASE:Inherit( self, POSITIONABLE:New( SceneryName ) )
|
||||||
|
|
||||||
self.SceneryName = SceneryName
|
self.SceneryName = SceneryName
|
||||||
|
|
||||||
self.SceneryObject = SceneryObject
|
self.SceneryObject = SceneryObject
|
||||||
|
|
||||||
if self.SceneryObject then
|
if self.SceneryObject then
|
||||||
self.Life0 = self.SceneryObject:getLife()
|
self.Life0 = self.SceneryObject:getLife()
|
||||||
else
|
else
|
||||||
@@ -53,7 +57,7 @@ end
|
|||||||
|
|
||||||
--- Obtain DCS Object from the SCENERY Object.
|
--- Obtain DCS Object from the SCENERY Object.
|
||||||
--@param #SCENERY self
|
--@param #SCENERY self
|
||||||
--@return #DCS.Object DCS scenery object.
|
--@return DCS#Object DCS scenery object.
|
||||||
function SCENERY:GetDCSObject()
|
function SCENERY:GetDCSObject()
|
||||||
return self.SceneryObject
|
return self.SceneryObject
|
||||||
end
|
end
|
||||||
@@ -69,7 +73,7 @@ function SCENERY:GetLife()
|
|||||||
return life
|
return life
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get current initial life points from the SCENERY Object.
|
--- Get initial life points of the SCENERY Object.
|
||||||
--@param #SCENERY self
|
--@param #SCENERY self
|
||||||
--@return #number life
|
--@return #number life
|
||||||
function SCENERY:GetLife0()
|
function SCENERY:GetLife0()
|
||||||
@@ -90,7 +94,7 @@ function SCENERY:IsDead()
|
|||||||
return self:GetLife() < 1 and true or false
|
return self:GetLife() < 1 and true or false
|
||||||
end
|
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
|
--@param #SCENERY self
|
||||||
--@return #number Threat level 0.
|
--@return #number Threat level 0.
|
||||||
--@return #string "Scenery".
|
--@return #string "Scenery".
|
||||||
|
|||||||
Reference in New Issue
Block a user