Progress, a lot is working already.

This commit is contained in:
FlightControl
2017-02-28 14:01:38 +01:00
parent e0254308d3
commit 8edbb5ca23
65 changed files with 1672 additions and 65421 deletions

View File

@@ -455,8 +455,7 @@ function GROUP:IsCompletelyInZone( Zone )
for UnitID, UnitData in pairs( self:GetUnits() ) do
local Unit = UnitData -- Wrapper.Unit#UNIT
-- TODO: Rename IsPointVec3InZone to IsVec3InZone
if Zone:IsPointVec3InZone( Unit:GetVec3() ) then
if Zone:IsVec3InZone( Unit:GetVec3() ) then
else
return false
end
@@ -474,7 +473,7 @@ function GROUP:IsPartlyInZone( Zone )
for UnitID, UnitData in pairs( self:GetUnits() ) do
local Unit = UnitData -- Wrapper.Unit#UNIT
if Zone:IsPointVec3InZone( Unit:GetVec3() ) then
if Zone:IsVec3InZone( Unit:GetVec3() ) then
return true
end
end
@@ -491,7 +490,7 @@ function GROUP:IsNotInZone( Zone )
for UnitID, UnitData in pairs( self:GetUnits() ) do
local Unit = UnitData -- Wrapper.Unit#UNIT
if Zone:IsPointVec3InZone( Unit:GetVec3() ) then
if Zone:IsVec3InZone( Unit:GetVec3() ) then
return false
end
end

View File

@@ -217,10 +217,7 @@ function IDENTIFIABLE:GetCallsign()
end
function IDENTIFIABLE:GetThreatLevel()
return 0, "Scenery"
end

View File

@@ -0,0 +1,39 @@
--- This module contains the SCENERY class.
--
-- 1) @{Scenery#SCENERY} class, extends @{Positionable#POSITIONABLE}
-- ===============================================================
-- Scenery objects are defined on the map.
-- The @{Scenery#SCENERY} class is a wrapper class to handle the DCS Scenery objects:
--
-- * Wraps the DCS Scenery objects.
-- * Support all DCS Scenery APIs.
-- * Enhance with Scenery specific APIs not in the DCS API set.
--
-- @module Scenery
-- @author FlightControl
--- The SCENERY class
-- @type SCENERY
-- @extends Wrapper.Positionable#POSITIONABLE
SCENERY = {
ClassName = "SCENERY",
}
function SCENERY:Register( SceneryName, SceneryObject )
local self = BASE:Inherit( self, POSITIONABLE:New( SceneryName ) )
self.SceneryName = SceneryName
self.SceneryObject = SceneryObject
return self
end
function SCENERY:GetDCSObject()
return self.SceneryObject
end
function SCENERY:GetThreatLevel()
return 0, "Scenery"
end

View File

@@ -673,7 +673,7 @@ function UNIT:IsInZone( Zone )
self:F2( { self.UnitName, Zone } )
if self:IsAlive() then
local IsInZone = Zone:IsPointVec3InZone( self:GetVec3() )
local IsInZone = Zone:IsVec3InZone( self:GetVec3() )
self:T( { IsInZone } )
return IsInZone
@@ -690,7 +690,7 @@ function UNIT:IsNotInZone( Zone )
self:F2( { self.UnitName, Zone } )
if self:IsAlive() then
local IsInZone = not Zone:IsPointVec3InZone( self:GetVec3() )
local IsInZone = not Zone:IsVec3InZone( self:GetVec3() )
self:T( { IsInZone } )
return IsInZone