- Removed the old classes and moved into an "Old" folder in the
Moose/Development folder.
-- Cleaned Moose.lua + Documented class types
-- Cleaned Create_Moose.bat + Documented class types

- Extend the ZONE_BASE class with a probability randomization factor,
that can be used for zone randomization purposes.

- Documented the Zone module classes.

- Changed and removed the POINT_VEC3 SmokeColor and FlareColor
structure. Replaced with SMOKECOLOR and FLARECOLOR types.
-- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR
references.

- Renamed UnControlled() method to InitUnControlled method.
This commit is contained in:
Sven Van de Velde
2016-08-15 12:30:36 +02:00
parent c000675471
commit 7cda194f45
117 changed files with 1460 additions and 46781 deletions

View File

@@ -38,17 +38,11 @@
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</a></li>
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
<li><a href="Database.html">Database</a></li>
<li><a href="Detection.html">Detection</a></li>
<li><a href="DetectionManager.html">DetectionManager</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
<li><a href="Group.html">Group</a></li>
<li><a href="Identifiable.html">Identifiable</a></li>
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
@@ -56,9 +50,7 @@
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li><a href="Mission.html">Mission</a></li>
<li><a href="NOTASK.html">NOTASK</a></li>
<li><a href="Object.html">Object</a></li>
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
<li><a href="PatrolZone.html">PatrolZone</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
@@ -67,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
@@ -85,6 +76,7 @@
<li><a href="Task_Route.html">Task_Route</a></li>
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="Utils.html">Utils</a></li>
<li>Zone</li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
@@ -126,42 +118,103 @@
<li><a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a>: The ZONE_POLYGON class defines by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</li>
</ul>
<p>Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</p>
<hr/>
<h1>1) <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
<h3>1.1) Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</h3>
<ul>
<li><a href="##(ZONE_BASE).IsPointVec2InZone">ZONE_BASE.IsPointVec2InZone</a>: Returns if a location is within the zone.</li>
<li><a href="##(ZONE_BASE).IsPointVec3InZone">ZONE_BASE.IsPointVec3InZone</a>: Returns if a point is within the zone.</li>
<li><a href="##(ZONE_BASE).IsPointVec2InZone">ZONE_BASE.IsPointVec2InZone</a>(): Returns if a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> is within the zone.</li>
<li><a href="##(ZONE_BASE).IsPointVec3InZone">ZONE_BASE.IsPointVec3InZone</a>(): Returns if a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> is within the zone.</li>
</ul>
<h3>1.2) A zone has a probability factor that can be set to randomize a selection between zones:</h3>
<ul>
<li><a href="##(ZONE_BASE).SetRandomizeProbability">ZONE_BASE.SetRandomizeProbability</a>(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
<li><a href="##(ZONE_BASE).GetRandomizeProbability">ZONE_BASE.GetRandomizeProbability</a>(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
<li><a href="##(ZONE_BASE).GetZoneRandomize">ZONE_BASE.GetZoneRandomize</a>(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.</li>
</ul>
<h3>1.3) A zone manages Vectors:</h3>
<ul>
<li><a href="##(ZONE_BASE).GetVec2">ZONE_BASE.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</li>
<li><a href="##(ZONE_BASE).GetRandomVec2">ZONE_BASE.GetRandomVec2</a>(): Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</li>
</ul>
<h3>1.4) A zone has a bounding square:</h3>
<ul>
<li><a href="##(ZONE_BASE).GetBoundingSquare">ZONE_BASE.GetBoundingSquare</a>(): Get the outer most bounding square of the zone.</li>
</ul>
<h3>1.5) A zone can be marked:</h3>
<ul>
<li><a href="##(ZONE_BASE).SmokeZone">ZONE_BASE.SmokeZone</a>(): Smokes the zone boundaries in a color.</li>
<li><a href="##(ZONE_BASE).FlareZone">ZONE_BASE.FlareZone</a>(): Flares the zone boundaries in a color.</li>
</ul>
<hr/>
<h1>1) <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The ZONE_BASE class defining the base for all other zone classes.</p>
<hr/>
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
<p>The ZONE<em>RADIUS class defined by a zone name, a location and a radius.
This class implements the inherited functions from Zone#ZONE</em>BASE taking into account the own zone format and properties.</p>
<h3>2.1) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> constructor:</h3>
<ul>
<li><a href="##(ZONE_BASE).New">ZONE_BASE.New</a>(): Constructor.</li>
</ul>
<h3>2.2) Manage the radius of the zone:</h3>
<ul>
<li><a href="##(ZONE_BASE).SetRadius">ZONE_BASE.SetRadius</a>(): Sets the radius of the zone.</li>
<li><a href="##(ZONE_BASE).GetRadius">ZONE_BASE.GetRadius</a>(): Returns the radius of the zone.</li>
</ul>
<h3>2.3) Manage the location of the zone:</h3>
<ul>
<li><a href="##(ZONE_BASE).SetVec2">ZONE_BASE.SetVec2</a>(): Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
<li><a href="##(ZONE_BASE).GetVec2">ZONE_BASE.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
<li><a href="##(ZONE_BASE).GetVec3">ZONE_BASE.GetVec3</a>(): Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> of the zone, taking an additional height parameter.</li>
</ul>
<hr/>
<h1>3) <a href="Zone.html##(ZONE)">Zone#ZONE</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.
This class implements the inherited functions from {Zone#ZONE_RADIUS} taking into account the own zone format and properties.</p>
<hr/>
<h1>4) <a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
<hr/>
<h1>5) <a href="Zone.html##(ZONE_GROUP)">Zone#ZONE_GROUP</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius. The current leader of the group defines the center of the zone.</p>
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius. The current leader of the group defines the center of the zone.
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
<hr/>
<h1>6) <a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
<h1>6) <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.
This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
<hr/>
<h1>7) <a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a> class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
<hr/>
@@ -245,12 +298,24 @@
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).GetRandomVec2">ZONE_BASE:GetRandomVec2()</a></td>
<td class="summary">
<p>Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).GetRandomizationProbability">ZONE_BASE:GetRandomizationProbability()</a></td>
<td class="summary">
<p>Get the randomization probability of a zone to be selected.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).GetVec2">ZONE_BASE:GetVec2()</a></td>
<td class="summary">
<p>Returns the Vec2 coordinate of the zone.</p>
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).GetZoneRandomized">ZONE_BASE:GetZoneRandomized()</a></td>
<td class="summary">
<p>Get the zone taking into account the randomization probability of a zone to be selected.</p>
</td>
</tr>
<tr>
@@ -269,6 +334,18 @@
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).New">ZONE_BASE:New(ZoneName)</a></td>
<td class="summary">
<p>ZONE_BASE constructor</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).RandomizationProbability">ZONE_BASE.RandomizationProbability</a></td>
<td class="summary">
<p>A value between 0 and 1. 0 = 0% and 1 = 100% probability.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).SetRandomizationProbability">ZONE_BASE:SetRandomizationProbability(RandomizationProbability)</a></td>
<td class="summary">
<p>Set the randomization probability of a zone to be selected.</p>
</td>
</tr>
<tr>
@@ -444,7 +521,7 @@
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).GetVec2">ZONE_RADIUS:GetVec2()</a></td>
<td class="summary">
<p>Returns the location of the zone.</p>
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</p>
</td>
</tr>
<tr>
@@ -468,25 +545,25 @@
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).New">ZONE_RADIUS:New(ZoneName, Vec2, Radius)</a></td>
<td class="summary">
<p>Constructor of ZONE_RADIUS, taking the zone name, the zone location and a radius.</p>
<p>Constructor of <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a>, taking the zone name, the zone location and a radius.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).Radius">ZONE_RADIUS.Radius</a></td>
<td class="summary">
<p>The radius of the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).SetPointVec2">ZONE_RADIUS:SetPointVec2(Vec2)</a></td>
<td class="summary">
<p>Sets the location of the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).SetRadius">ZONE_RADIUS:SetRadius(Radius)</a></td>
<td class="summary">
<p>Sets the radius of the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).SetVec2">ZONE_RADIUS:SetVec2(Vec2)</a></td>
<td class="summary">
<p>Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</p>
</td>
</tr>
<tr>
@@ -650,8 +727,6 @@
</dl>
<h2><a id="#(Zone)" >Type <code>Zone</code></a></h2>
<h2><a id="#(POINT_VEC3.FlareColor)" >Type <code>POINT_VEC3.FlareColor</code></a></h2>
<h2><a id="#(POINT_VEC3.SmokeColor)" >Type <code>POINT_VEC3.SmokeColor</code></a></h2>
<h2><a id="#(ZONE)" >Type <code>ZONE</code></a></h2>
@@ -762,13 +837,31 @@ The Vec2 coordinates.</p>
<dl class="function">
<dt>
<a id="#(ZONE_BASE).GetRandomizationProbability" >
<strong>ZONE_BASE:GetRandomizationProbability()</strong>
</a>
</dt>
<dd>
<p>Get the randomization probability of a zone to be selected.</p>
<h3>Return value</h3>
<p><em>#number:</em>
A value between 0 and 1. 0 = 0% and 1 = 100% probability.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE_BASE).GetVec2" >
<strong>ZONE_BASE:GetVec2()</strong>
</a>
</dt>
<dd>
<p>Returns the Vec2 coordinate of the zone.</p>
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</p>
<h3>Return value</h3>
@@ -780,6 +873,34 @@ The Vec2 coordinates.</p>
<dl class="function">
<dt>
<a id="#(ZONE_BASE).GetZoneRandomized" >
<strong>ZONE_BASE:GetZoneRandomized()</strong>
</a>
</dt>
<dd>
<p>Get the zone taking into account the randomization probability of a zone to be selected.</p>
<h3>Return values</h3>
<ol>
<li>
<p><em><a href="##(ZONE_BASE)">#ZONE_BASE</a>:</em>
The zone is selected taking into account the randomization probability factor.</p>
</li>
<li>
<p><em>#nil:</em>
The zone is not selected taking into account the randomization probability factor.</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE_BASE).IsPointVec2InZone" >
<strong>ZONE_BASE:IsPointVec2InZone(Vec2)</strong>
</a>
@@ -856,6 +977,42 @@ Name of the zone.</p>
<p><em><a href="##(ZONE_BASE)">#ZONE_BASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(ZONE_BASE).RandomizationProbability" >
<strong>ZONE_BASE.RandomizationProbability</strong>
</a>
</dt>
<dd>
<p>A value between 0 and 1. 0 = 0% and 1 = 100% probability.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE_BASE).SetRandomizationProbability" >
<strong>ZONE_BASE:SetRandomizationProbability(RandomizationProbability)</strong>
</a>
</dt>
<dd>
<p>Set the randomization probability of a zone to be selected.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> RandomizationProbability </em></code>:
A value between 0 and 1. 0 = 0% and 1 = 100% probability.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
@@ -1344,7 +1501,7 @@ self</p>
<ul>
<li>
<p><code><em><a href="##(POINT_VEC3.FlareColor)">#POINT_VEC3.FlareColor</a> FlareColor </em></code>:
<p><code><em><a href="Utils.html##(FLARECOLOR)">Utils#FLARECOLOR</a> FlareColor </em></code>:
The flare color.</p>
</li>
@@ -1413,7 +1570,7 @@ The random location within the zone.</p>
</dt>
<dd>
<p>Returns the location of the zone.</p>
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</p>
<h3>Return value</h3>
@@ -1512,7 +1669,7 @@ true if the point is within the zone.</p>
</dt>
<dd>
<p>Constructor of ZONE_RADIUS, taking the zone name, the zone location and a radius.</p>
<p>Constructor of <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a>, taking the zone name, the zone location and a radius.</p>
<h3>Parameters</h3>
<ul>
@@ -1559,33 +1716,6 @@ self</p>
<dl class="function">
<dt>
<a id="#(ZONE_RADIUS).SetPointVec2" >
<strong>ZONE_RADIUS:SetPointVec2(Vec2)</strong>
</a>
</dt>
<dd>
<p>Sets the location of the zone.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> Vec2 </em></code>:
The new location of the zone.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>:</em>
The new location of the zone.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE_RADIUS).SetRadius" >
<strong>ZONE_RADIUS:SetRadius(Radius)</strong>
</a>
@@ -1613,6 +1743,33 @@ The radius of the zone.</p>
<dl class="function">
<dt>
<a id="#(ZONE_RADIUS).SetVec2" >
<strong>ZONE_RADIUS:SetVec2(Vec2)</strong>
</a>
</dt>
<dd>
<p>Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> Vec2 </em></code>:
The new location of the zone.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>:</em>
The new location of the zone.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE_RADIUS).SmokeZone" >
<strong>ZONE_RADIUS:SmokeZone(SmokeColor, Points)</strong>
</a>