Added methods to COORDINATE to place marks on the map

* Added new methods to COORDINATE allowing to place marks for players on
the map. Now marks can be placed on the map using :AddToAll(),
:MarkToCoalition(), :MarkToCoalitionRed(), :MarkToCoalitionBlue(),
:MarkToGroup() and marks can be removed using :RemoveMark()
This commit is contained in:
FlightControl_Master
2017-09-11 06:51:14 +02:00
parent ae4affbf2f
commit 51e50bee71
14 changed files with 575 additions and 30 deletions

View File

@@ -315,6 +315,30 @@
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).IsLOS">COORDINATE:IsLOS(ToCoordinate)</a></td>
<td class="summary">
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).MarkToAll">COORDINATE:MarkToAll(MarkText)</a></td>
<td class="summary">
<p>Mark to All</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).MarkToCoalition">COORDINATE:MarkToCoalition(MarkText, Coalition)</a></td>
<td class="summary">
<p>Mark to Coalition</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).MarkToCoalitionBlue">COORDINATE:MarkToCoalitionBlue(MarkText)</a></td>
<td class="summary">
<p>Mark to Blue Coalition</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).MarkToCoalitionRed">COORDINATE:MarkToCoalitionRed(MarkText)</a></td>
<td class="summary">
<p>Mark to Red Coalition</p>
</td>
</tr>
<tr>
@@ -333,6 +357,12 @@
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).NewFromVec3">COORDINATE:NewFromVec3(Vec3)</a></td>
<td class="summary">
<p>Create a new COORDINATE object from Vec3 coordinates.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).RemoveMark">COORDINATE:RemoveMark(MarkID)</a></td>
<td class="summary">
<p>Remove a mark</p>
</td>
</tr>
<tr>
@@ -382,6 +412,18 @@
<td class="summary">
<p>Provides a coordinate string of the point, based on a coordinate format system:
* Uses default settings in COORDINATE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).ToStringA2A">COORDINATE:ToStringA2A(Controllable, Settings)</a></td>
<td class="summary">
<p>Provides a coordinate string of the point, based on the A2A coordinate format system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).ToStringA2G">COORDINATE:ToStringA2G(Controllable, Settings)</a></td>
<td class="summary">
<p>Provides a coordinate string of the point, based on the A2G coordinate format system.</p>
</td>
</tr>
<tr>
@@ -850,6 +892,20 @@
</ul>
<h2>Markings</h2>
<p>Place markers (text boxes with clarifications for briefings, target locations or any other reference point) on the map for all players, coalitions or specific groups:</p>
<ul>
<li><a href="##(COORDINATE).MarkToAll">COORDINATE.MarkToAll</a>(): Place a mark to all players.</li>
<li><a href="##(COORDINATE).MarkToCoalition">COORDINATE.MarkToCoalition</a>(): Place a mark to a coalition.</li>
<li><a href="##(COORDINATE).MarkToCoalitionRed">COORDINATE.MarkToCoalitionRed</a>(): Place a mark to the red coalition.</li>
<li><a href="##(COORDINATE).MarkToCoalitionBlue">COORDINATE.MarkToCoalitionBlue</a>(): Place a mark to the blue coalition.</li>
<li><a href="##(COORDINATE).MarkToGroup">COORDINATE.MarkToGroup</a>(): Place a mark to a group (needs to have a client in it or a CA group (CA group is bugged)).</li>
<li><a href="##(COORDINATE).RemoveMark">COORDINATE.RemoveMark</a>(): Removes a mark from the map.</li>
</ul>
<h2>3D calculation methods</h2>
<p>Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:</p>
@@ -1688,6 +1744,135 @@ true If the ToCoordinate has LOS with the Coordinate, otherwise false.</p>
<dl class="function">
<dt>
<a id="#(COORDINATE).MarkToAll" >
<strong>COORDINATE:MarkToAll(MarkText)</strong>
</a>
</dt>
<dd>
<p>Mark to All</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string MarkText </em></code>:
Free format text that shows the marking clarification.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
The resulting Mark ID which is a number.</p>
<h3>Usage:</h3>
<pre class="example"><code> local TargetCoord = TargetGroup:GetCoordinate()
local MarkID = TargetCoord:MarkToAll( "This is a target for all players" )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).MarkToCoalition" >
<strong>COORDINATE:MarkToCoalition(MarkText, Coalition)</strong>
</a>
</dt>
<dd>
<p>Mark to Coalition</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string MarkText </em></code>:
Free format text that shows the marking clarification.</p>
</li>
<li>
<p><code><em> Coalition </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
The resulting Mark ID which is a number.</p>
<h3>Usage:</h3>
<pre class="example"><code> local TargetCoord = TargetGroup:GetCoordinate()
local MarkID = TargetCoord:MarkToCoalition( "This is a target for the red coalition", coalition.side.RED )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).MarkToCoalitionBlue" >
<strong>COORDINATE:MarkToCoalitionBlue(MarkText)</strong>
</a>
</dt>
<dd>
<p>Mark to Blue Coalition</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string MarkText </em></code>:
Free format text that shows the marking clarification.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
The resulting Mark ID which is a number.</p>
<h3>Usage:</h3>
<pre class="example"><code> local TargetCoord = TargetGroup:GetCoordinate()
local MarkID = TargetCoord:MarkToCoalitionBlue( "This is a target for the blue coalition" )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).MarkToCoalitionRed" >
<strong>COORDINATE:MarkToCoalitionRed(MarkText)</strong>
</a>
</dt>
<dd>
<p>Mark to Red Coalition</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string MarkText </em></code>:
Free format text that shows the marking clarification.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
The resulting Mark ID which is a number.</p>
<h3>Usage:</h3>
<pre class="example"><code> local TargetCoord = TargetGroup:GetCoordinate()
local MarkID = TargetCoord:MarkToCoalitionRed( "This is a target for the red coalition" )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).New" >
<strong>COORDINATE:New(x, y, z)</strong>
</a>
@@ -1782,6 +1967,35 @@ The Vec3 point.</p>
<p><em><a href="##(COORDINATE)">#COORDINATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).RemoveMark" >
<strong>COORDINATE:RemoveMark(MarkID)</strong>
</a>
</dt>
<dd>
<p>Remove a mark</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number MarkID </em></code>:
The ID of the mark to be removed.</p>
</li>
</ul>
<h3>Usage:</h3>
<pre class="example"><code> local TargetCoord = TargetGroup:GetCoordinate()
local MarkGroup = GROUP:FindByName( "AttackGroup" )
local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup )
&lt;&lt;&lt; logic &gt;&gt;&gt;
RemoveMark( MarkID ) -- The mark is now removed</code></pre>
</dd>
</dl>
<dl class="function">
@@ -1937,6 +2151,68 @@ The coordinate Text in the configured coordinate system.</p>
<dl class="function">
<dt>
<a id="#(COORDINATE).ToStringA2A" >
<strong>COORDINATE:ToStringA2A(Controllable, Settings)</strong>
</a>
</dt>
<dd>
<p>Provides a coordinate string of the point, based on the A2A coordinate format system.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>: </p>
</li>
<li>
<p><code><em><a href="Core.Settings.html##(SETTINGS)">Core.Settings#SETTINGS</a> Settings </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#string:</em>
The coordinate Text in the configured coordinate system.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).ToStringA2G" >
<strong>COORDINATE:ToStringA2G(Controllable, Settings)</strong>
</a>
</dt>
<dd>
<p>Provides a coordinate string of the point, based on the A2G coordinate format system.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>: </p>
</li>
<li>
<p><code><em><a href="Core.Settings.html##(SETTINGS)">Core.Settings#SETTINGS</a> Settings </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#string:</em>
The coordinate Text in the configured coordinate system.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).ToStringAspect" >
<strong>COORDINATE:ToStringAspect(TargetCoordinate)</strong>
</a>
@@ -2862,7 +3138,6 @@ The y coordinate.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(POINT_VEC2).z" >
<strong>POINT_VEC2.z</strong>
</a>