mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Added DESIGNATE:SetMission() method.
-- Allows to place the designate menu under the menu of the mission.
This commit is contained in:
parent
2c16992b5c
commit
1206935886
@ -167,7 +167,12 @@ do -- DESIGNATE
|
||||
--
|
||||
-- The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target.
|
||||
--
|
||||
-- ## 6. Status Report
|
||||
-- ## 6. Designate Menu Location for a Mission
|
||||
--
|
||||
-- You can make DESIGNATE work for a MISSION object. In this way, the Designate menu will not appear in the root of the radio menu, but in the menu of the Mission.
|
||||
-- Use the method @{#DESIGNATE.SetMission}() to set the MISSION object for the designate function.
|
||||
--
|
||||
-- ## 7. Status Report
|
||||
--
|
||||
-- A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.
|
||||
--
|
||||
@ -501,6 +506,17 @@ do -- DESIGNATE
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set the MISSION object for which designate will function.
|
||||
-- When a MISSION object is assigned, the menu for the designation will be located at the Mission Menu.
|
||||
-- @param #DESIGNATE self
|
||||
-- @param Tasking.Mission#MISSION Mission The MISSION object.
|
||||
-- @return #DESIGNATE
|
||||
function DESIGNATE:SetMission( Mission ) --R2.2
|
||||
|
||||
self.Mission = Mission
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
@ -612,8 +628,15 @@ do -- DESIGNATE
|
||||
DesignateMenu = nil
|
||||
self:E("Remove Menu")
|
||||
end
|
||||
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate" )
|
||||
self:E(DesignateMenu)
|
||||
|
||||
local MissionMenu = nil
|
||||
|
||||
if self.Mission then
|
||||
MissionMenu = self.Mission:GetRootMenu( AttackGroup )
|
||||
end
|
||||
|
||||
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate", MissionMenu )
|
||||
self:E( DesignateMenu )
|
||||
AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu )
|
||||
|
||||
-- Set Menu option for auto lase
|
||||
|
||||
@ -475,7 +475,28 @@ function MISSION:RemoveTaskMenu( Task )
|
||||
end
|
||||
|
||||
|
||||
--- Gets the mission menu for the coalition.
|
||||
--- Gets the root mission menu for the TaskGroup.
|
||||
-- @param #MISSION self
|
||||
-- @return Core.Menu#MENU_COALITION self
|
||||
function MISSION:GetRootMenu( TaskGroup ) -- R2.2
|
||||
|
||||
local CommandCenter = self:GetCommandCenter()
|
||||
local CommandCenterMenu = CommandCenter:GetMenu()
|
||||
|
||||
local MissionName = self:GetName()
|
||||
--local MissionMenu = CommandCenterMenu:GetMenu( MissionName )
|
||||
|
||||
self.MissionMenu = self.MissionMenu or {}
|
||||
self.MissionMenu[TaskGroup] = self.MissionMenu[TaskGroup] or {}
|
||||
|
||||
local Menu = self.MissionMenu[TaskGroup]
|
||||
|
||||
Menu.MainMenu = Menu.MainMenu or MENU_GROUP:New( TaskGroup, self:GetName(), CommandCenterMenu )
|
||||
|
||||
return Menu.MainMenu
|
||||
end
|
||||
|
||||
--- Gets the mission menu for the TaskGroup.
|
||||
-- @param #MISSION self
|
||||
-- @return Core.Menu#MENU_COALITION self
|
||||
function MISSION:GetMenu( TaskGroup ) -- R2.1 -- Changed Menu Structure
|
||||
|
||||
@ -575,7 +575,6 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(AI_A2A).IdleCount" >
|
||||
<strong>AI_A2A.IdleCount</strong>
|
||||
</a>
|
||||
|
||||
@ -3697,8 +3697,6 @@ Provide a value of <strong>true</strong> to display every 30 seconds a tactical
|
||||
<p>Enumerator for spawns at airbases</p>
|
||||
|
||||
|
||||
<h2><a id="#(AI_A2A_DISPATCHER_GCICAP)" >Type <code>AI_A2A_DISPATCHER_GCICAP</code></a></h2>
|
||||
|
||||
<h2><a id="#(AI_A2A_GCICAP)" >Type <code>AI_A2A_GCICAP</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
@ -3769,7 +3767,7 @@ For airplanes, 6000 (6km) is recommended, and is also the default value of this
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_A2A_DISPATCHER_GCICAP)">#AI<em>A2A</em>DISPATCHER_GCICAP</a>:</em></p>
|
||||
<p><em><a href="##(AI_A2A_GCICAP)">#AI<em>A2A</em>GCICAP</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
|
||||
@ -3542,6 +3542,7 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(CARGO_UNIT).RunCount" >
|
||||
<strong>CARGO_UNIT.RunCount</strong>
|
||||
</a>
|
||||
|
||||
@ -292,6 +292,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).MenuStatus">DESIGNATE:MenuStatus(AttackGroup, Duration)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).Mission">DESIGNATE.Mission</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -412,6 +418,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).SetLaserCodes">DESIGNATE:SetLaserCodes(<, LaserCodes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set an array of possible laser codes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).SetMission">DESIGNATE:SetMission(Mission)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set the MISSION object for which designate will function.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -680,7 +692,12 @@ If not activated, Targets will be selected in a random order, but most like thos
|
||||
|
||||
<p>The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target.</p>
|
||||
|
||||
<h2>6. Status Report</h2>
|
||||
<h2>6. Designate Menu Location for a Mission</h2>
|
||||
|
||||
<p>You can make DESIGNATE work for a MISSION object. In this way, the Designate menu will not appear in the root of the radio menu, but in the menu of the Mission.
|
||||
Use the method <a href="##(DESIGNATE).SetMission">DESIGNATE.SetMission</a>() to set the MISSION object for the designate function.</p>
|
||||
|
||||
<h2>7. Status Report</h2>
|
||||
|
||||
<p>A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.</p>
|
||||
|
||||
@ -900,7 +917,6 @@ function below will use the range 1-7 just in case</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DESIGNATE).LaserCodes" >
|
||||
<strong>DESIGNATE.LaserCodes</strong>
|
||||
</a>
|
||||
@ -1095,6 +1111,20 @@ function below will use the range 1-7 just in case</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DESIGNATE).Mission" >
|
||||
<strong>DESIGNATE.Mission</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1711,6 +1741,36 @@ number> LaserCodes</p>
|
||||
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DESIGNATE).SetMission" >
|
||||
<strong>DESIGNATE:SetMission(Mission)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set the MISSION object for which designate will function.</p>
|
||||
|
||||
|
||||
<p>When a MISSION object is assigned, the menu for the designation will be located at the Mission Menu.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Tasking.Mission.html##(MISSION)">Tasking.Mission#MISSION</a> Mission </em></code>:
|
||||
The MISSION object.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -2393,6 +2393,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemCount" >
|
||||
<strong>DETECTION_BASE.DetectedItemCount</strong>
|
||||
</a>
|
||||
@ -2406,6 +2407,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemMax" >
|
||||
<strong>DETECTION_BASE.DetectedItemMax</strong>
|
||||
</a>
|
||||
@ -2563,7 +2565,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectionInterval" >
|
||||
<strong>DETECTION_BASE.DetectionInterval</strong>
|
||||
</a>
|
||||
|
||||
@ -1598,7 +1598,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#string</em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1897,7 +1897,6 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -204,7 +204,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetMenu">MISSION:GetMenu(TaskGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets the mission menu for the coalition.</p>
|
||||
<p>Gets the mission menu for the TaskGroup.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -223,6 +223,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetPlayerNames">MISSION:GetPlayerNames()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetRootMenu">MISSION:GetRootMenu(TaskGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets the root mission menu for the TaskGroup.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -900,7 +906,7 @@ The CLIENT or UNIT of the Player crashing.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Gets the mission menu for the coalition.</p>
|
||||
<p>Gets the mission menu for the TaskGroup.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -973,6 +979,32 @@ The task added.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSION).GetRootMenu" >
|
||||
<strong>MISSION:GetRootMenu(TaskGroup)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Gets the root mission menu for the TaskGroup.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> TaskGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Core.Menu.html##(MENU_COALITION)">Core.Menu#MENU_COALITION</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -227,6 +227,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -235,6 +236,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -2829,7 +2829,6 @@ The y coordinate.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
|
||||
@ -822,12 +822,6 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2200,6 +2194,9 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2749,6 +2746,9 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2784,7 +2784,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@ -2801,7 +2801,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@ -3129,7 +3129,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).SpawnUnControlled" >
|
||||
<strong>SPAWN.SpawnUnControlled</strong>
|
||||
</a>
|
||||
@ -3153,7 +3153,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -3733,20 +3733,6 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -630,7 +630,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(TASK_CARGO).CargoLimit" >
|
||||
<strong>TASK_CARGO.CargoLimit</strong>
|
||||
</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user