diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index 14b8fbb03..f73ebd462 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -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 diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index d50ec823b..07133d305 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -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 diff --git a/docs/Documentation/AI_A2A.html b/docs/Documentation/AI_A2A.html index 2a24504d1..ee2dc9007 100644 --- a/docs/Documentation/AI_A2A.html +++ b/docs/Documentation/AI_A2A.html @@ -575,7 +575,6 @@
- #number AI_A2A.IdleCount diff --git a/docs/Documentation/AI_A2A_Dispatcher.html b/docs/Documentation/AI_A2A_Dispatcher.html index 568a9c010..8cce934af 100644 --- a/docs/Documentation/AI_A2A_Dispatcher.html +++ b/docs/Documentation/AI_A2A_Dispatcher.html @@ -3697,8 +3697,6 @@ Provide a value of true to display every 30 seconds a tactical

Enumerator for spawns at airbases

-

Type AI_A2A_DISPATCHER_GCICAP

-

Type AI_A2A_GCICAP

Field(s)

@@ -3769,7 +3767,7 @@ For airplanes, 6000 (6km) is recommended, and is also the default value of this

Return value

-

#AIA2ADISPATCHER_GCICAP:

+

#AIA2AGCICAP:

Usage:

diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index 9f6098452..fe4a4263b 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -3542,6 +3542,7 @@ The range till cargo will board.

+ #number CARGO_UNIT.RunCount diff --git a/docs/Documentation/Designate.html b/docs/Documentation/Designate.html index 70e3562df..ace6dc583 100644 --- a/docs/Documentation/Designate.html +++ b/docs/Documentation/Designate.html @@ -292,6 +292,12 @@ each detected set of potential targets can be lased or smoked...

DESIGNATE:MenuStatus(AttackGroup, Duration) + + + + DESIGNATE.Mission + + @@ -412,6 +418,12 @@ each detected set of potential targets can be lased or smoked...

DESIGNATE:SetLaserCodes(<, LaserCodes)

Set an array of possible laser codes.

+ + + + DESIGNATE:SetMission(Mission) + +

Set the MISSION object for which designate will function.

@@ -680,7 +692,12 @@ If not activated, Targets will be selected in a random order, but most like thos

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.

@@ -900,7 +917,6 @@ function below will use the range 1-7 just in case

- DESIGNATE.LaserCodes @@ -1095,6 +1111,20 @@ function below will use the range 1-7 just in case

+ +
+
+
+ + + +DESIGNATE.Mission + +
+
+ + +
@@ -1711,6 +1741,36 @@ number> LaserCodes

#DESIGNATE:

+ +
+
+
+ + +DESIGNATE:SetMission(Mission) + +
+
+ +

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.

+ +

Parameter

+ +

Return value

+ +

#DESIGNATE:

+ +
diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index f077a893b..829d377e1 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -2393,6 +2393,7 @@ The index of the DetectedItem.

+ #number DETECTION_BASE.DetectedItemCount @@ -2406,6 +2407,7 @@ The index of the DetectedItem.

+ #number DETECTION_BASE.DetectedItemMax @@ -2563,7 +2565,7 @@ The index of the DetectedItem.

- + #number DETECTION_BASE.DetectionInterval diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index e0276d335..177f34281 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -1598,7 +1598,7 @@ A string defining the start state.

- + #string FSM._StartState @@ -1897,7 +1897,6 @@ A string defining the start state.

- FSM.current diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index d34e8e4e1..2b7b44682 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -204,7 +204,7 @@ MISSION:GetMenu(TaskGroup) -

Gets the mission menu for the coalition.

+

Gets the mission menu for the TaskGroup.

@@ -223,6 +223,12 @@ MISSION:GetPlayerNames() + + + + MISSION:GetRootMenu(TaskGroup) + +

Gets the root mission menu for the TaskGroup.

@@ -900,7 +906,7 @@ The CLIENT or UNIT of the Player crashing.

-

Gets the mission menu for the coalition.

+

Gets the mission menu for the TaskGroup.

Parameter

    @@ -973,6 +979,32 @@ The task added.

    +
+
+
+
+ + +MISSION:GetRootMenu(TaskGroup) + +
+
+ +

Gets the root mission menu for the TaskGroup.

+ +

Parameter

+
    +
  • + +

    TaskGroup :

    + +
  • +
+

Return value

+ +

Core.Menu#MENU_COALITION: +self

+
diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html index 4307c3aaa..be5ce073c 100644 --- a/docs/Documentation/Movement.html +++ b/docs/Documentation/Movement.html @@ -227,6 +227,7 @@ on defined intervals (currently every minute).

+ #number MOVEMENT.AliveUnits @@ -235,6 +236,9 @@ on defined intervals (currently every minute).

+ +

Contains the counter how many units are currently alive

+
diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index f561df108..864921e2a 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -2829,7 +2829,6 @@ The y coordinate.

- POINT_VEC2.z diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 05a9cda85..0f27003d1 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -822,12 +822,6 @@ and any spaces before and after the resulting name are removed.

SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - - - - SPAWN.uncontrolled - - @@ -2200,6 +2194,9 @@ The group that was spawned. You can use this group for further actions.

+ +

Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.

+
@@ -2749,6 +2746,9 @@ when nothing was spawned.

+ +

By default, no InitLimit

+
@@ -2784,7 +2784,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxGroups @@ -2801,7 +2801,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxUnitsAlive @@ -3129,7 +3129,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
- + #boolean SPAWN.SpawnUnControlled @@ -3153,7 +3153,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

When the first Spawn executes, all the Groups need to be made visible before start.

+

Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

@@ -3733,20 +3733,6 @@ True = Continue Scheduler

- -
-
-
- - - -SPAWN.uncontrolled - -
-
- - -
diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html index 743615651..ab67c2b1a 100644 --- a/docs/Documentation/Task_Cargo.html +++ b/docs/Documentation/Task_Cargo.html @@ -630,7 +630,7 @@ based on the tasking capabilities defined in Task#TA
- #number + TASK_CARGO.CargoLimit