Updates and fixes

- Replaced range test for unit to range test for players.
- Ensure that players database is properly populated.
- Fixed some documentation.
- Removed smoke from trigger.
- Fixed name of RandomPointVec2 to RandomVec2 and fixed in all usages.
This commit is contained in:
FlightControl
2016-06-20 13:12:51 +02:00
parent 8a3cdc6b85
commit c8443f8798
13 changed files with 247 additions and 238 deletions

View File

@@ -86,13 +86,13 @@
<ul>
<li>UNITS</li>
<li>GROUPS</li>
<li>players</li>
<li>alive players</li>
<li>CLIENTS</li>
<li>alive CLIENTS</li>
<li>AIRPORTS</li>
<li>PLAYERSJOINED</li>
<li>PLAYERS</li>
</ul>
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Gruop templates as defined within the Mission Editor.</p>
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
<p>Moose will automatically create one instance of the DATABASE class into the <strong>global</strong> object _DATABASE.
Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.</p>
@@ -105,13 +105,15 @@ The following iterator methods are currently available within the DATABASE:</p>
<ul>
<li><a href="##(DATABASE).ForEachUnit">DATABASE.ForEachUnit</a>: Calls a function for each <a href="UNIT.html">UNIT</a> it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachGroup">DATABASE.ForEachGroup</a>: Calls a function for each <a href="GROUP.html">GROUP</a> it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachPlayer">DATABASE.ForEachPlayer</a>: Calls a function for each player it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachPlayerAlive">DATABASE.ForEachPlayerAlive</a>: Calls a function for each alive player it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachPlayer">DATABASE.ForEachPlayer</a>: Calls a function for each alive player it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachPlayerJoined">DATABASE.ForEachPlayerJoined</a>: Calls a function for each joined player it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachClient">DATABASE.ForEachClient</a>: Calls a function for each <a href="CLIENT.html">CLIENT</a> it finds within the DATABASE.</li>
<li><a href="##(DATABASE).ForEachClientAlive">DATABASE.ForEachClientAlive</a>: Calls a function for each alive <a href="CLIENT.html">CLIENT</a> it finds within the DATABASE.
</li>
<li><a href="##(DATABASE).ForEachClientAlive">DATABASE.ForEachClientAlive</a>: Calls a function for each alive <a href="CLIENT.html">CLIENT</a> it finds within the DATABASE.</li>
</ul>
<hr/>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
@@ -169,12 +171,6 @@ The following iterator methods are currently available within the DATABASE:</p>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).CLIENTS">DATABASE.CLIENTS</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).CLIENTSALIVE">DATABASE.CLIENTSALIVE</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -247,12 +243,6 @@ The following iterator methods are currently available within the DATABASE:</p>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachClient">DATABASE:ForEachClient(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachClientAlive">DATABASE:ForEachClientAlive(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> CLIENT, providing the CLIENT to the function and optional parameters.</p>
</td>
</tr>
<tr>
@@ -264,13 +254,13 @@ The following iterator methods are currently available within the DATABASE:</p>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayer">DATABASE:ForEachPlayer(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each player, providing the player name and optional parameters.</p>
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player, providing the player name and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayerAlive">DATABASE:ForEachPlayerAlive(IteratorFunction, ...)</a></td>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayerJoined">DATABASE:ForEachPlayerJoined(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> player, providing the Unit of the player and optional parameters.</p>
<p>Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.</p>
</td>
</tr>
<tr>
@@ -340,7 +330,7 @@ The following iterator methods are currently available within the DATABASE:</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERSALIVE">DATABASE.PLAYERSALIVE</a></td>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERSJOINED">DATABASE.PLAYERSJOINED</a></td>
<td class="summary">
</td>
@@ -622,20 +612,6 @@ The following iterator methods are currently available within the DATABASE:</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DATABASE).CLIENTSALIVE" >
<strong>DATABASE.CLIENTSALIVE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -943,38 +919,6 @@ self</p>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachClientAlive" >
<strong>DATABASE:ForEachClientAlive(IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> CLIENT, providing the CLIENT to the function and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called when there is an alive CLIENT in the database. The function needs to accept a CLIENT parameter.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachGroup" >
<strong>DATABASE:ForEachGroup(IteratorFunction, ...)</strong>
</a>
@@ -1013,7 +957,7 @@ self</p>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each player, providing the player name and optional parameters.</p>
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player, providing the player name and optional parameters.</p>
<h3>Parameters</h3>
<ul>
@@ -1039,20 +983,20 @@ self</p>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachPlayerAlive" >
<strong>DATABASE:ForEachPlayerAlive(IteratorFunction, ...)</strong>
<a id="#(DATABASE).ForEachPlayerJoined" >
<strong>DATABASE:ForEachPlayerJoined(IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> player, providing the Unit of the player and optional parameters.</p>
<p>Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called when there is an alive player in the database. The function needs to accept a UNIT parameter.</p>
The function that will be called when there is was a player in the database. The function needs to accept a UNIT parameter.</p>
</li>
<li>
@@ -1299,8 +1243,8 @@ DBObject = DATABASE:New()</code></pre>
<dt>
<em></em>
<a id="#(DATABASE).PLAYERSALIVE" >
<strong>DATABASE.PLAYERSALIVE</strong>
<a id="#(DATABASE).PLAYERSJOINED" >
<strong>DATABASE.PLAYERSJOINED</strong>
</a>
</dt>
<dd>

View File

@@ -321,6 +321,18 @@
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).IniDCSUnitName">EVENTDATA.IniDCSUnitName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).IniUnit">EVENTDATA.IniUnit</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).IniUnitName">EVENTDATA.IniUnitName</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -345,6 +357,18 @@
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).TgtDCSUnitName">EVENTDATA.TgtDCSUnitName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).TgtUnit">EVENTDATA.TgtUnit</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).TgtUnitName">EVENTDATA.TgtUnitName</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -1592,6 +1616,34 @@ The self instance of the class for which the event is.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Unit.html##(UNIT)">Unit#UNIT</a></em>
<a id="#(EVENTDATA).IniUnit" >
<strong>EVENTDATA.IniUnit</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(EVENTDATA).IniUnitName" >
<strong>EVENTDATA.IniUnitName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -1644,6 +1696,34 @@ The self instance of the class for which the event is.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Unit.html##(UNIT)">Unit#UNIT</a></em>
<a id="#(EVENTDATA).TgtUnit" >
<strong>EVENTDATA.TgtUnit</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(EVENTDATA).TgtUnitName" >
<strong>EVENTDATA.TgtUnitName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">

View File

@@ -376,7 +376,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).GetRandomPointVec2">ZONE_RADIUS:GetRandomPointVec2()</a></td>
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).GetRandomVec2">ZONE_RADIUS:GetRandomVec2()</a></td>
<td class="summary">
<p>Returns a random location within the zone.</p>
</td>
@@ -1200,8 +1200,8 @@ The radius of the zone.</p>
<dl class="function">
<dt>
<a id="#(ZONE_RADIUS).GetRandomPointVec2" >
<strong>ZONE_RADIUS:GetRandomPointVec2()</strong>
<a id="#(ZONE_RADIUS).GetRandomVec2" >
<strong>ZONE_RADIUS:GetRandomVec2()</strong>
</a>
</dt>
<dd>