Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl

# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	docs/Documentation/Zone.html
This commit is contained in:
FlightControl
2017-03-03 09:51:17 +01:00
102 changed files with 4247 additions and 659 deletions

View File

@@ -35,8 +35,8 @@
--
-- ## 1.2) Each zone implements two polymorphic functions defined in @{Zone#ZONE_BASE}:
--
-- * @{#ZONE_BASE.IsPointVec2InZone}(): Returns if a @{Point#POINT_VEC2} is within the zone.
-- * @{#ZONE_BASE.IsPointVec3InZone}(): Returns if a @{Point#POINT_VEC3} is within the zone.
-- * @{#ZONE_BASE.IsVec2InZone}(): Returns if a Vec2 is within the zone.
-- * @{#ZONE_BASE.IsVec3InZone}(): Returns if a Vec3 is within the zone.
--
-- ## 1.3) A zone has a probability factor that can be set to randomize a selection between zones:
--
@@ -145,21 +145,28 @@
--
-- Hereby the change log:
--
-- 2017-02-18: ZONE_POLYGON_BASE:**GetRandomPointVec2()** added.
-- 2017-02-28: ZONE\_BASE:**IsVec2InZone()** replaces ZONE\_BASE:_IsPointVec2InZone()_.
-- 2017-02-28: ZONE\_BASE:**IsVec3InZone()** replaces ZONE\_BASE:_IsPointVec3InZone()_.
-- 2017-02-28: ZONE\_RADIUS:**IsVec2InZone()** replaces ZONE\_RADIUS:_IsPointVec2InZone()_.
-- 2017-02-28: ZONE\_RADIUS:**IsVec3InZone()** replaces ZONE\_RADIUS:_IsPointVec3InZone()_.
-- 2017-02-28: ZONE\_POLYGON:**IsVec2InZone()** replaces ZONE\_POLYGON:_IsPointVec2InZone()_.
-- 2017-02-28: ZONE\_POLYGON:**IsVec3InZone()** replaces ZONE\_POLYGON:_IsPointVec3InZone()_.
--
-- 2017-02-18: ZONE_POLYGON_BASE:**GetRandomPointVec3()** added.
-- 2017-02-18: ZONE\_POLYGON_BASE:**GetRandomPointVec2()** added.
--
-- 2017-02-18: ZONE_RADIUS:**GetRandomPointVec3( inner, outer )** added.
-- 2017-02-18: ZONE\_POLYGON_BASE:**GetRandomPointVec3()** added.
--
-- 2017-02-18: ZONE_RADIUS:**GetRandomPointVec2( inner, outer )** added.
-- 2017-02-18: ZONE\_RADIUS:**GetRandomPointVec3( inner, outer )** added.
--
-- 2016-08-15: ZONE_BASE:**GetName()** added.
-- 2017-02-18: ZONE\_RADIUS:**GetRandomPointVec2( inner, outer )** added.
--
-- 2016-08-15: ZONE_BASE:**SetZoneProbability( ZoneProbability )** added.
-- 2016-08-15: ZONE\_BASE:**GetName()** added.
--
-- 2016-08-15: ZONE_BASE:**GetZoneProbability()** added.
-- 2016-08-15: ZONE\_BASE:**SetZoneProbability( ZoneProbability )** added.
--
-- 2016-08-15: ZONE_BASE:**GetZoneMaybe()** added.
-- 2016-08-15: ZONE\_BASE:**GetZoneProbability()** added.
--
-- 2016-08-15: ZONE\_BASE:**GetZoneMaybe()** added.
--
-- ===
--
@@ -212,7 +219,7 @@ end
-- @param #ZONE_BASE self
-- @param Dcs.DCSTypes#Vec2 Vec2 The location to test.
-- @return #boolean true if the location is within the zone.
function ZONE_BASE:IsPointVec2InZone( Vec2 )
function ZONE_BASE:IsVec2InZone( Vec2 )
self:F2( Vec2 )
return false
@@ -222,10 +229,10 @@ end
-- @param #ZONE_BASE self
-- @param Dcs.DCSTypes#Vec3 Vec3 The point to test.
-- @return #boolean true if the point is within the zone.
function ZONE_BASE:IsPointVec3InZone( Vec3 )
function ZONE_BASE:IsVec3InZone( Vec3 )
self:F2( Vec3 )
local InZone = self:IsPointVec2InZone( { x = Vec3.x, y = Vec3.z } )
local InZone = self:IsVec2InZone( { x = Vec3.x, y = Vec3.z } )
return InZone
end
@@ -514,7 +521,7 @@ end
-- @param #ZONE_RADIUS self
-- @param Dcs.DCSTypes#Vec2 Vec2 The location to test.
-- @return #boolean true if the location is within the zone.
function ZONE_RADIUS:IsPointVec2InZone( Vec2 )
function ZONE_RADIUS:IsVec2InZone( Vec2 )
self:F2( Vec2 )
local ZoneVec2 = self:GetVec2()
@@ -532,10 +539,10 @@ end
-- @param #ZONE_RADIUS self
-- @param Dcs.DCSTypes#Vec3 Vec3 The point to test.
-- @return #boolean true if the point is within the zone.
function ZONE_RADIUS:IsPointVec3InZone( Vec3 )
function ZONE_RADIUS:IsVec3InZone( Vec3 )
self:F2( Vec3 )
local InZone = self:IsPointVec2InZone( { x = Vec3.x, y = Vec3.z } )
local InZone = self:IsVec2InZone( { x = Vec3.x, y = Vec3.z } )
return InZone
end
@@ -854,7 +861,7 @@ end
-- @param #ZONE_POLYGON_BASE self
-- @param Dcs.DCSTypes#Vec2 Vec2 The location to test.
-- @return #boolean true if the location is within the zone.
function ZONE_POLYGON_BASE:IsPointVec2InZone( Vec2 )
function ZONE_POLYGON_BASE:IsVec2InZone( Vec2 )
self:F2( Vec2 )
local Next
@@ -896,7 +903,7 @@ function ZONE_POLYGON_BASE:GetRandomVec2()
while Vec2Found == false do
Vec2 = { x = math.random( BS.x1, BS.x2 ), y = math.random( BS.y1, BS.y2 ) }
self:T2( Vec2 )
if self:IsPointVec2InZone( Vec2 ) then
if self:IsVec2InZone( Vec2 ) then
Vec2Found = true
end
end