A lot of fixes

See #386
This commit is contained in:
FlightControl
2017-04-24 12:38:24 +02:00
parent a8da12c09d
commit f410d2ae0b
15 changed files with 593 additions and 121 deletions

View File

@@ -969,6 +969,13 @@ mission designer to add a dedicated method</p>
<td class="name" nowrap="nowrap"><a href="##(SET_UNIT).ForEachUnitNotInZone">SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the SET_UNIT and call an iterator function for each <strong>alive</strong> UNIT presence not in a <a href="Zone.html">Zone</a>, providing the UNIT and optional parameters to the called function.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SET_UNIT).ForEachUnitPerThreatLevel">SET_UNIT:ForEachUnitPerThreatLevel(FromThreatLevel, ToThreatLevel, IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the SET_UNIT <strong>sorted *per Threat Level</strong> and call an interator function for each <strong>alive</strong> UNIT, providing the UNIT and optional parameters.</p>
</td>
</tr>
<tr>
@@ -4755,6 +4762,61 @@ self</p>
<dl class="function">
<dt>
<a id="#(SET_UNIT).ForEachUnitPerThreatLevel" >
<strong>SET_UNIT:ForEachUnitPerThreatLevel(FromThreatLevel, ToThreatLevel, IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the SET_UNIT <strong>sorted *per Threat Level</strong> and call an interator function for each <strong>alive</strong> UNIT, providing the UNIT and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#number FromThreatLevel </em></code>:
The TreatLevel to start the evaluation <strong>From</strong> (this must be a value between 0 and 10).</p>
</li>
<li>
<p><code><em>#number ToThreatLevel </em></code>:
The TreatLevel to stop the evaluation <strong>To</strong> (this must be a value between 0 and 10).</p>
</li>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(SET_UNIT)">#SET_UNIT</a>:</em>
self</p>
<h3>Usage:</h3>
<pre class="example"><code>
UnitSet:ForEachUnitPerThreatLevel( 10, 0,
-- @param Wrapper.Unit#UNIT UnitObject The UNIT object in the UnitSet, that will be passed to the local function for evaluation.
function( UnitObject )
.. logic ..
end
)
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SET_UNIT).GetTypeNames" >
<strong>SET_UNIT:GetTypeNames(Delimiter)</strong>
</a>