Resolve problems with Zone.lua

also generate Dynamic Loader (forgot to generate it after generating static for tests)
This commit is contained in:
Grey-Echo
2017-04-05 09:35:06 +02:00
parent 3ca84adb53
commit d5adf0a282
2 changed files with 18 additions and 11 deletions

View File

@@ -66,6 +66,13 @@
-- @module Zone -- @module Zone
--- The ZONE_BASE class
-- @type ZONE_BASE
-- @field #string ZoneName Name of the zone.
-- @field #number ZoneProbability A value between 0 and 1. 0 = 0% and 1 = 100% probability.
-- @extends Core.Base#BASE
--- # 1) ZONE_BASE class, extends @{Base#BASE} --- # 1) ZONE_BASE class, extends @{Base#BASE}
-- --
-- This class is an abstract BASE class for derived classes, and is not meant to be instantiated. -- This class is an abstract BASE class for derived classes, and is not meant to be instantiated.
@@ -100,11 +107,7 @@
-- * @{#ZONE_BASE.FlareZone}(): Flares the zone boundaries in a color. -- * @{#ZONE_BASE.FlareZone}(): Flares the zone boundaries in a color.
-- --
-- === -- ===
-- -- @field #ZONE_BASE ZONE_BASE
-- @type ZONE_BASE
-- @field #string ZoneName Name of the zone.
-- @field #number ZoneProbability A value between 0 and 1. 0 = 0% and 1 = 100% probability.
-- @extends Core.Base#BASE
ZONE_BASE = { ZONE_BASE = {
ClassName = "ZONE_BASE", ClassName = "ZONE_BASE",
ZoneName = "", ZoneName = "",
@@ -303,6 +306,12 @@ function ZONE_BASE:GetZoneMaybe()
end end
--- The ZONE_RADIUS class, defined by a zone name, a location and a radius.
-- @type ZONE_RADIUS
-- @field Dcs.DCSTypes#Vec2 Vec2 The current location of the zone.
-- @field Dcs.DCSTypes#Distance Radius The radius of the zone.
-- @extends Core.Zone#ZONE_BASE
--- # 2) @{Zone#ZONE_RADIUS} class, extends @{Zone#ZONE_BASE} --- # 2) @{Zone#ZONE_RADIUS} class, extends @{Zone#ZONE_BASE}
-- --
-- The ZONE_RADIUS class defined by a zone name, a location and a radius. -- The ZONE_RADIUS class defined by a zone name, a location and a radius.
@@ -333,11 +342,8 @@ end
-- --
-- === -- ===
-- --
-- The ZONE_RADIUS class, defined by a zone name, a location and a radius. -- @field #ZONE_RADIUS ZONE_RADIUS
-- @type ZONE_RADIUS --
-- @field Dcs.DCSTypes#Vec2 Vec2 The current location of the zone.
-- @field Dcs.DCSTypes#Distance Radius The radius of the zone.
-- @extends Core.Zone#ZONE_BASE
ZONE_RADIUS = { ZONE_RADIUS = {
ClassName="ZONE_RADIUS", ClassName="ZONE_RADIUS",
} }
@@ -373,6 +379,7 @@ function ZONE_RADIUS:BoundZone( Points, CountryID, UnBound )
local Angle local Angle
local RadialBase = math.pi*2 local RadialBase = math.pi*2
--
for Angle = 0, 360, (360 / Points ) do for Angle = 0, 360, (360 / Points ) do
local Radial = Angle * RadialBase / 360 local Radial = Angle * RadialBase / 360
Point.x = Vec2.x + math.cos( Radial ) * self:GetRadius() Point.x = Vec2.x + math.cos( Radial ) * self:GetRadius()

View File

@@ -1,5 +1,5 @@
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170405_0123' ) env.info( 'Moose Generation Timestamp: 20170405_0934' )
local base = _G local base = _G