DESIGNATE can now lase for specific codes

* DESIGNATE can now lase targets with specific laser codes upon request
by players. Methods :AddMenuLaserCode() and :RemoveMenuLaserCode()
added, which allow to set or delete specific additional menu options in
the lase menu for players to lase with specific codes. This comes in
handy for the SU-25T and the A-10A and other planes.
This commit is contained in:
FlightControl_Master
2017-08-29 21:48:11 +02:00
parent 9784b694ba
commit 62ab859215
22 changed files with 1345 additions and 462 deletions

View File

@@ -190,12 +190,6 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).CalculateIntercept">DETECTION_AREAS:CalculateIntercept(DetectedItem)</a></td>
<td class="summary">
<p>Calculate the optimal intercept point of the DetectedItem.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).CalculateThreatLevelA2G">DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem)</a></td>
<td class="summary">
<p>Calculate the maxium A2G threat level of the DetectedItem.</p>
</td>
</tr>
<tr>
@@ -262,18 +256,6 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetChangeText">DETECTION_AREAS:GetChangeText(DetectedItem)</a></td>
<td class="summary">
<p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetDetectedItemCoordinate">DETECTION_AREAS:GetDetectedItemCoordinate(Index)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetTreatLevelA2G">DETECTION_AREAS:GetTreatLevelA2G(DetectedItem)</a></td>
<td class="summary">
<p>Returns the A2G threat level of the units in the DetectedItem</p>
</td>
</tr>
<tr>
@@ -583,6 +565,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedItemID">DETECTION_BASE:GetDetectedItemID(Index)</a></td>
<td class="summary">
<p>Get a detected ItemID using a given numeric index.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedItemThreatLevel">DETECTION_BASE:GetDetectedItemThreatLevel(Index)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td>
</tr>
<tr>
@@ -613,6 +601,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedSet">DETECTION_BASE:GetDetectedSet(Index)</a></td>
<td class="summary">
<p>Get the <a href="Set.html##(SET_UNIT)">Set#SET_UNIT</a> of a detecttion area using a given numeric index.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedUnitTypeName">DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit)</a></td>
<td class="summary">
<p>Gets a detected unit type name, taking into account the detection results.</p>
</td>
</tr>
<tr>
@@ -643,12 +637,6 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetPlayersNearBy">DETECTION_BASE:GetPlayersNearBy(DetectedItem)</a></td>
<td class="summary">
<p>Returns friendly units nearby the FAC units ...</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).HasDetectedItemLOS">DETECTION_BASE:HasDetectedItemLOS(Index)</a></td>
<td class="summary">
<p>Has the detected item LOS (Line Of Sight) with one of the Recce?</p>
</td>
</tr>
<tr>
@@ -865,6 +853,18 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).SetAlphaAngleProbability">DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability)</a></td>
<td class="summary">
<p>Upon a <strong>visual</strong> detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).SetDetectedItemCoordinate">DETECTION_BASE:SetDetectedItemCoordinate(The, Coordinate, DetectedItemUnit, DetectedItem)</a></td>
<td class="summary">
<p>Set the detected item coordinate.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).SetDetectedItemThreatLevel">DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem)</a></td>
<td class="summary">
<p>Set the detected item threatlevel.</p>
</td>
</tr>
<tr>
@@ -995,6 +995,18 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).Changes">DETECTION_BASE.DetectedItem.Changes</a></td>
<td class="summary">
<p>A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).Coordinate">DETECTION_BASE.DetectedItem.Coordinate</a></td>
<td class="summary">
<p>The last known coordinate of the DetectedItem.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).DistanceRecce">DETECTION_BASE.DetectedItem.DistanceRecce</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -1013,12 +1025,6 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).InterceptCoord">DETECTION_BASE.DetectedItem.InterceptCoord</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).MaxThreatLevelA2G">DETECTION_BASE.DetectedItem.MaxThreatLevelA2G</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -1031,6 +1037,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).Set">DETECTION_BASE.DetectedItem.Set</a></td>
<td class="summary">
<p>-- The Set of Units in the detected area.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE.DetectedItem).ThreatLevel">DETECTION_BASE.DetectedItem.ThreatLevel</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -1147,12 +1159,6 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_TYPES).GetChangeText">DETECTION_TYPES:GetChangeText(DetectedItem)</a></td>
<td class="summary">
<p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_TYPES).GetDetectedItemCoordinate">DETECTION_TYPES:GetDetectedItemCoordinate(DetectedTypeName)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td>
</tr>
<tr>
@@ -1235,12 +1241,6 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_UNITS).GetChangeText">DETECTION_UNITS:GetChangeText(DetectedItem)</a></td>
<td class="summary">
<p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_UNITS).GetDetectedItemCoordinate">DETECTION_UNITS:GetDetectedItemCoordinate(Index)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td>
</tr>
<tr>
@@ -1571,8 +1571,6 @@ a DetectedItem. The default range is 6000 meters. For air detections, it is advi
</dl>
<h2><a id="#(Detection)" >Type <code>Detection</code></a></h2>
<h2><a id="#(Core.Point)" >Type <code>Core.Point</code></a></h2>
<h2><a id="#(DETECTION_AREAS)" >Type <code>DETECTION_AREAS</code></a></h2>
<p> # 4) DETECTION_AREAS class, extends <a href="Detection.html##(DETECTION_BASE)">Detection#DETECTION_BASE</a></p>
@@ -1646,27 +1644,6 @@ self</p>
<ul>
<li>
<p><code><em><a href="##(DETECTION_BASE.DetectedItem)">#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_AREAS).CalculateThreatLevelA2G" >
<strong>DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Calculate the maxium A2G threat level of the DetectedItem.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(DETECTION_BASE.DetectedItem)">#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
@@ -1911,62 +1888,6 @@ The Changes text</p>
<dl class="function">
<dt>
<a id="#(DETECTION_AREAS).GetDetectedItemCoordinate" >
<strong>DETECTION_AREAS:GetDetectedItemCoordinate(Index)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<p>In this case, the coordinate is the center of the zone of the area, not the center unit!
So if units move, the retrieved coordinate can be different from the units positions.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a>:</em>
The coordinate.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_AREAS).GetTreatLevelA2G" >
<strong>DETECTION_AREAS:GetTreatLevelA2G(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Returns the A2G threat level of the units in the DetectedItem</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(DETECTION_BASE.DetectedItem)">#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
a scale from 0 to 10. </p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_AREAS).NearestFAC" >
<strong>DETECTION_AREAS:NearestFAC(DetectedItem)</strong>
</a>
@@ -2943,7 +2864,7 @@ DetectedItemID</p>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
<p><code><em>#number Index </em></code>: </p>
</li>
</ul>
@@ -2983,6 +2904,32 @@ DetectedItemID</p>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).GetDetectedItemThreatLevel" >
<strong>DETECTION_BASE:GetDetectedItemThreatLevel(Index)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
ThreatLevel</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).GetDetectedItemZone" >
<strong>DETECTION_BASE:GetDetectedItemZone(Index)</strong>
</a>
@@ -3097,6 +3044,32 @@ DetectedSet</p>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).GetDetectedUnitTypeName" >
<strong>DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit)</strong>
</a>
</dt>
<dd>
<p>Gets a detected unit type name, taking into account the detection results.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> DetectedUnit </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#string:</em>
The type name</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).GetDetectionSetGroup" >
<strong>DETECTION_BASE:GetDetectionSetGroup()</strong>
</a>
@@ -3219,32 +3192,6 @@ The distance. </p>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).HasDetectedItemLOS" >
<strong>DETECTION_BASE:HasDetectedItemLOS(Index)</strong>
</a>
</dt>
<dd>
<p>Has the detected item LOS (Line Of Sight) with one of the Recce?</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true is LOS, false if no LOS.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).IdentifyDetectedObject" >
<strong>DETECTION_BASE:IdentifyDetectedObject(DetectedObject)</strong>
</a>
@@ -4250,6 +4197,82 @@ The probability factor.</p>
<p><em><a href="##(DETECTION_BASE)">#DETECTION_BASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).SetDetectedItemCoordinate" >
<strong>DETECTION_BASE:SetDetectedItemCoordinate(The, Coordinate, DetectedItemUnit, DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Set the detected item coordinate.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(DETECTION_BASE.DetectedItem)">#DETECTION_BASE.DetectedItem</a> The </em></code>:
DetectedItem to set the coordinate at.</p>
</li>
<li>
<p><code><em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a> Coordinate </em></code>:
The coordinate to set the last know detected position at.</p>
</li>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> DetectedItemUnit </em></code>:
The unit to set the heading and altitude from.</p>
</li>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DETECTION_BASE)">#DETECTION_BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).SetDetectedItemThreatLevel" >
<strong>DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Set the detected item threatlevel.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(DETECTION_BASE.DetectedItem)">#DETECTION_BASE.DetectedItem</a> The </em></code>:
DetectedItem to calculate the threatlevel for.</p>
</li>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DETECTION_BASE)">#DETECTION_BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
@@ -4775,6 +4798,34 @@ The To State string.</p>
<p>A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a></em>
<a id="#(DETECTION_BASE.DetectedItem).Coordinate" >
<strong>DETECTION_BASE.DetectedItem.Coordinate</strong>
</a>
</dt>
<dd>
<p>The last known coordinate of the DetectedItem.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DETECTION_BASE.DetectedItem).DistanceRecce" >
<strong>DETECTION_BASE.DetectedItem.DistanceRecce</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -4817,20 +4868,6 @@ The To State string.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DETECTION_BASE.DetectedItem).MaxThreatLevelA2G" >
<strong>DETECTION_BASE.DetectedItem.MaxThreatLevelA2G</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -4859,6 +4896,20 @@ The To State string.</p>
<p>-- The Set of Units in the detected area.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DETECTION_BASE.DetectedItem).ThreatLevel" >
<strong>DETECTION_BASE.DetectedItem.ThreatLevel</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -5219,32 +5270,6 @@ The Changes text</p>
<dl class="function">
<dt>
<a id="#(DETECTION_TYPES).GetDetectedItemCoordinate" >
<strong>DETECTION_TYPES:GetDetectedItemCoordinate(DetectedTypeName)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DetectedTypeName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(Core.Point)">#Core.Point</a>:</em>
COORDINATE</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_TYPES).New" >
<strong>DETECTION_TYPES:New(DetectionSetGroup)</strong>
</a>
@@ -5523,32 +5548,6 @@ The group to generate the report for.</p>
<p><em>#string:</em>
The Changes text</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_UNITS).GetDetectedItemCoordinate" >
<strong>DETECTION_UNITS:GetDetectedItemCoordinate(Index)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a>:</em></p>
</dd>
</dl>
<dl class="function">