From ccfcca8f9ac66cea3d3b9940125863a58c2321a0 Mon Sep 17 00:00:00 2001
From: FlightControl
Date: Tue, 4 Jul 2017 10:55:45 +0200
Subject: [PATCH] Tweaks for the settings system
- Player settings are located at the group level. Only the first player
that joins the group will be able to configure the settings.
- Default system settings are located at the group of the commend
center. Thus, the COMMANDCENTER class will contain the default system
settings menu. You need to join the command center unit (ALT-J) as a
game master to be able to configure these settings.
---
Moose Development/Moose/Core/Point.lua | 4 +-
Moose Development/Moose/Core/Settings.lua | 175 +++++++++---------
.../Moose/Functional/CleanUp.lua | 4 +-
Moose Development/Moose/Moose.lua | 2 +-
.../Moose/Tasking/CommandCenter.lua | 2 +
docs/Documentation/AI_Patrol.html | 3 +
docs/Documentation/Cargo.html | 1 +
docs/Documentation/CleanUp.html | 51 ++++-
docs/Documentation/Controllable.html | 19 ++
docs/Documentation/Designate.html | 1 -
docs/Documentation/Detection.html | 3 +-
docs/Documentation/Movement.html | 4 -
docs/Documentation/Settings.html | 2 +-
docs/Documentation/Spawn.html | 12 +-
docs/Documentation/SpawnStatic.html | 1 -
docs/Documentation/Task.html | 35 +++-
docs/Documentation/Task_Cargo.html | 83 ++++++++-
17 files changed, 283 insertions(+), 119 deletions(-)
diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua
index bb36cabe8..9b0dfb64f 100644
--- a/Moose Development/Moose/Core/Point.lua
+++ b/Moose Development/Moose/Core/Point.lua
@@ -804,7 +804,7 @@ do -- COORDINATE
local IsAir = Controllable and Controllable:IsAirPlane() or false
if IsAir then
- if Settings:IsA2A_BRA() then
+ if Settings:IsA2A_BRAA() then
local Coordinate = Controllable:GetCoordinate()
return self:ToStringBRA( Coordinate, Settings )
end
@@ -814,7 +814,7 @@ do -- COORDINATE
return self:ToStringBULLS( Coalition, Settings )
end
else
- if Settings:IsA2G_BRA() then
+ if Settings:IsA2G_BR() then
local Coordinate = Controllable:GetCoordinate()
return Controllable and self:ToStringBR( Coordinate, Settings ) or self:ToStringMGRS( Settings )
end
diff --git a/Moose Development/Moose/Core/Settings.lua b/Moose Development/Moose/Core/Settings.lua
index dc0926ba5..5bb5db0dc 100644
--- a/Moose Development/Moose/Core/Settings.lua
+++ b/Moose Development/Moose/Core/Settings.lua
@@ -56,7 +56,7 @@ do -- SETTINGS
local self = BASE:Inherit( self, BASE:New() ) -- #SETTINGS
self:SetMetric() -- Defaults
self:SetA2G_MGRS() -- Defaults
- self:SetA2A_BRA() -- Defaults
+ self:SetA2A_BRAA() -- Defaults
self:SetLL_Accuracy( 2 ) -- Defaults
self:SetLL_DMS( true ) -- Defaults
self:SetMGRS_Accuracy( 5 ) -- Defaults
@@ -179,31 +179,31 @@ do -- SETTINGS
--- Sets A2G BRA
-- @param #SETTINGS self
-- @return #SETTINGS
- function SETTINGS:SetA2G_BRA()
- self.A2GSystem = "BRA"
+ function SETTINGS:SetA2G_BR()
+ self.A2GSystem = "BR"
end
--- Is BRA
-- @param #SETTINGS self
-- @return #boolean true if BRA
- function SETTINGS:IsA2G_BRA()
- self:E( { BRA = ( self.A2GSystem and self.A2GSystem == "BRA" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BRA() ) } )
- return ( self.A2GSystem and self.A2GSystem == "BRA" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BRA() )
+ function SETTINGS:IsA2G_BR()
+ self:E( { BRA = ( self.A2GSystem and self.A2GSystem == "BR" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BR() ) } )
+ return ( self.A2GSystem and self.A2GSystem == "BR" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BR() )
end
--- Sets A2A BRA
-- @param #SETTINGS self
-- @return #SETTINGS
- function SETTINGS:SetA2A_BRA()
- self.A2ASystem = "BRA"
+ function SETTINGS:SetA2A_BRAA()
+ self.A2ASystem = "BRAA"
end
--- Is BRA
-- @param #SETTINGS self
-- @return #boolean true if BRA
- function SETTINGS:IsA2A_BRA()
- self:E( { BRA = ( self.A2ASystem and self.A2ASystem == "BRA" ) or ( not self.A2ASystem and _SETTINGS:IsA2A_BRA() ) } )
- return ( self.A2ASystem and self.A2ASystem == "BRA" ) or ( not self.A2ASystem and _SETTINGS:IsA2A_BRA() )
+ function SETTINGS:IsA2A_BRAA()
+ self:E( { BRA = ( self.A2ASystem and self.A2ASystem == "BRAA" ) or ( not self.A2ASystem and _SETTINGS:IsA2A_BRAA() ) } )
+ return ( self.A2ASystem and self.A2ASystem == "BRAA" ) or ( not self.A2ASystem and _SETTINGS:IsA2A_BRAA() )
end
--- Sets A2A BULLS
@@ -222,66 +222,62 @@ do -- SETTINGS
--- @param #SETTINGS self
-- @return #SETTINGS
- function SETTINGS:SetSystemMenu( RootMenu, MenuText )
+ function SETTINGS:SetSystemMenu( MenuGroup, RootMenu )
- MenuText = MenuText or "System Settings"
-
- if not self.SettingsMenu then
- self.SettingsMenu = MENU_MISSION:New( MenuText, RootMenu )
- end
-
- if self.DefaultMenu then
- self.DefaultMenu:Remove()
- self.DefaultMenu = nil
- end
- self.DefaultMenu = MENU_MISSION:New( "Default Settings", self.SettingsMenu )
+ local MenuText = "System Settings"
- local A2GCoordinateMenu = MENU_MISSION:New( "A2G Coordinate System", self.DefaultMenu )
+ local MenuTime = timer.getTime()
+
+ local SettingsMenu = MENU_GROUP:New( MenuGroup, MenuText, RootMenu ):SetTime( MenuTime )
+
+ local A2GCoordinateMenu = MENU_GROUP:New( MenuGroup, "A2G Coordinate System", SettingsMenu ):SetTime( MenuTime )
if self:IsA2G_LL() then
- MENU_MISSION_COMMAND:New( "Activate BRA", A2GCoordinateMenu, self.A2GMenuSystem, self, "BRA" )
- MENU_MISSION_COMMAND:New( "Activate MGRS", A2GCoordinateMenu, self.A2GMenuSystem, self, "MGRS" )
- MENU_MISSION_COMMAND:New( "LL Accuracy 1", A2GCoordinateMenu, self.MenuLL_Accuracy, self, 1 )
- MENU_MISSION_COMMAND:New( "LL Accuracy 2", A2GCoordinateMenu, self.MenuLL_Accuracy, self, 2 )
- MENU_MISSION_COMMAND:New( "LL Accuracy 3", A2GCoordinateMenu, self.MenuLL_Accuracy, self, 3 )
- MENU_MISSION_COMMAND:New( "LL Decimal On", A2GCoordinateMenu, self.MenuLL_DMS, self, true )
- MENU_MISSION_COMMAND:New( "LL Decimal Off", A2GCoordinateMenu, self.MenuLL_DMS, self, false )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Bearing, Range (BR)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "BR" ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "MGRS" ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL) Accuracy 1", A2GCoordinateMenu, self.MenuLL_Accuracy, self, MenuGroup, RootMenu, 1 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL) Accuracy 2", A2GCoordinateMenu, self.MenuLL_Accuracy, self, MenuGroup, RootMenu, 2 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL) Accuracy 3", A2GCoordinateMenu, self.MenuLL_Accuracy, self, MenuGroup, RootMenu, 3 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL) Decimal On", A2GCoordinateMenu, self.MenuLL_DMS, self, MenuGroup, RootMenu, true ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL) Decimal Off", A2GCoordinateMenu, self.MenuLL_DMS, self, MenuGroup, RootMenu, false ):SetTime( MenuTime )
end
if self:IsA2G_MGRS() then
- MENU_MISSION_COMMAND:New( "Activate BRA", A2GCoordinateMenu, self.A2GMenuSystem, self, "BRA" )
- MENU_MISSION_COMMAND:New( "Activate LL", A2GCoordinateMenu, self.A2GMenuSystem, self, "LL" )
- MENU_MISSION_COMMAND:New( "MGRS Accuracy 1", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 1 )
- MENU_MISSION_COMMAND:New( "MGRS Accuracy 2", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 2 )
- MENU_MISSION_COMMAND:New( "MGRS Accuracy 3", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 3 )
- MENU_MISSION_COMMAND:New( "MGRS Accuracy 4", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 4 )
- MENU_MISSION_COMMAND:New( "MGRS Accuracy 5", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 5 )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Bearing, Range (BR)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "BR" ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "LL" ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS) Accuracy 1", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, MenuGroup, RootMenu, 1 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS) Accuracy 2", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, MenuGroup, RootMenu, 2 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS) Accuracy 3", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, MenuGroup, RootMenu, 3 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS) Accuracy 4", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, MenuGroup, RootMenu, 4 ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS) Accuracy 5", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, MenuGroup, RootMenu, 5 ):SetTime( MenuTime )
end
- if self:IsA2G_BRA() then
- MENU_MISSION_COMMAND:New( "Activate MGRS", A2GCoordinateMenu, self.A2GMenuSystem, self, "MGRS" )
- MENU_MISSION_COMMAND:New( "Activate LL", A2GCoordinateMenu, self.A2GMenuSystem, self, "LL" )
+ if self:IsA2G_BR() then
+ MENU_GROUP_COMMAND:New( MenuGroup, "Military Grid (MGRS)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "MGRS" ):SetTime( MenuTime )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Lattitude Longitude (LL)", A2GCoordinateMenu, self.A2GMenuSystem, self, MenuGroup, RootMenu, "LL" ):SetTime( MenuTime )
end
- local A2ACoordinateMenu = MENU_MISSION:New( "A2A Coordinate System", self.DefaultMenu )
+ local A2ACoordinateMenu = MENU_GROUP:New( MenuGroup, "A2A Coordinate System", SettingsMenu ):SetTime( MenuTime )
if self:IsA2A_BULLS() then
- MENU_MISSION_COMMAND:New( "Activate BRA", A2ACoordinateMenu, self.A2AMenuSystem, self, "BRA" )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Bearing Range Altitude Aspect (BRAA)", A2ACoordinateMenu, self.A2AMenuSystem, self, MenuGroup, RootMenu, "BRAA" ):SetTime( MenuTime )
end
- if self:IsA2A_BRA() then
- MENU_MISSION_COMMAND:New( "Activate BULLS", A2ACoordinateMenu, self.A2AMenuSystem, self, "BULLS" )
+ if self:IsA2A_BRAA() then
+ MENU_GROUP_COMMAND:New( MenuGroup, "Bullseye (BULLS)", A2ACoordinateMenu, self.A2AMenuSystem, self, MenuGroup, RootMenu, "BULLS" ):SetTime( MenuTime )
end
- local MetricsMenu = MENU_MISSION:New( "Measures and Weights System", self.DefaultMenu )
+ local MetricsMenu = MENU_GROUP:New( MenuGroup, "Measures and Weights System", SettingsMenu ):SetTime( MenuTime )
if self:IsMetric() then
- MENU_MISSION_COMMAND:New( "Activate Imperial", MetricsMenu, self.MenuMWSystem, self, false )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Imperial (Miles,Feet)", MetricsMenu, self.MenuMWSystem, self, MenuGroup, RootMenu, false ):SetTime( MenuTime )
end
if self:IsImperial() then
- MENU_MISSION_COMMAND:New( "Activate Metric", MetricsMenu, self.MenuMWSystem, self, true )
+ MENU_GROUP_COMMAND:New( MenuGroup, "Metric (Kilometers,Meters)", MetricsMenu, self.MenuMWSystem, self, MenuGroup, RootMenu, true ):SetTime( MenuTime )
end
+
+ SettingsMenu:Remove( MenuTime )
return self
end
@@ -293,65 +289,59 @@ do -- SETTINGS
-- @return #SETTINGS
function SETTINGS:SetPlayerMenu( PlayerUnit )
- local MenuText = "Player Settings"
- self.MenuText = MenuText
-
- local SettingsMenu = _SETTINGS.SettingsMenu
-
local PlayerGroup = PlayerUnit:GetGroup()
local PlayerName = PlayerUnit:GetPlayerName()
local PlayerNames = PlayerGroup:GetPlayerNames()
- local GroupMenu = MENU_GROUP:New( PlayerGroup, MenuText, SettingsMenu )
- local PlayerMenu = MENU_GROUP:New( PlayerGroup, 'Settings "' .. PlayerName .. '"', GroupMenu )
+ local PlayerMenu = MENU_GROUP:New( PlayerGroup, 'Settings "' .. PlayerName .. '"' )
self.PlayerMenu = PlayerMenu
local A2GCoordinateMenu = MENU_GROUP:New( PlayerGroup, "A2G Coordinate System", PlayerMenu )
if self:IsA2G_LL() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate BRA", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "BRA" )
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate MGRS", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "MGRS" )
- MENU_GROUP_COMMAND:New( PlayerGroup, "LL Accuracy 1", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 1 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "LL Accuracy 2", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 2 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "LL Accuracy 3", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 3 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "LL Decimal On", A2GCoordinateMenu, self.MenuGroupLL_DMSSystem, self, PlayerUnit, PlayerGroup, PlayerName, true )
- MENU_GROUP_COMMAND:New( PlayerGroup, "LL Decimal Off", A2GCoordinateMenu, self.MenuGroupLL_DMSSystem, self, PlayerUnit, PlayerGroup, PlayerName, false )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Bearing, Range (BR)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "BR" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "MGRS" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL) Accuracy 1", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 1 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL) Accuracy 2", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 2 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL) Accuracy 3", A2GCoordinateMenu, self.MenuGroupLL_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 3 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL) Decimal On", A2GCoordinateMenu, self.MenuGroupLL_DMSSystem, self, PlayerUnit, PlayerGroup, PlayerName, true )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL) Decimal Off", A2GCoordinateMenu, self.MenuGroupLL_DMSSystem, self, PlayerUnit, PlayerGroup, PlayerName, false )
end
if self:IsA2G_MGRS() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate BRA", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "BRA" )
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate LL", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "LL" )
- MENU_GROUP_COMMAND:New( PlayerGroup, "MGRS Accuracy 1", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 1 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "MGRS Accuracy 2", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 2 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "MGRS Accuracy 3", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 3 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "MGRS Accuracy 4", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 4 )
- MENU_GROUP_COMMAND:New( PlayerGroup, "MGRS Accuracy 5", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 5 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Bearing Range (BR)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "BR" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "LL" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS) Accuracy 1", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 1 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS) Accuracy 2", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 2 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS) Accuracy 3", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 3 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS) Accuracy 4", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 4 )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS) Accuracy 5", A2GCoordinateMenu, self.MenuGroupMGRS_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 5 )
end
- if self:IsA2G_BRA() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate MGRS", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "MGRS" )
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate LL", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "LL" )
+ if self:IsA2G_BR() then
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Military Grid (MGRS)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "MGRS" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Lattitude Longitude (LL)", A2GCoordinateMenu, self.MenuGroupA2GSystem, self, PlayerUnit, PlayerGroup, PlayerName, "LL" )
end
local A2ACoordinateMenu = MENU_GROUP:New( PlayerGroup, "A2A Coordinate System", PlayerMenu )
if self:IsA2A_BULLS() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate BRA", A2ACoordinateMenu, self.MenuGroupA2ASystem, self, PlayerUnit, PlayerGroup, PlayerName, "BRA" )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Bearing Range Altitude Aspect (BRAA)", A2ACoordinateMenu, self.MenuGroupA2ASystem, self, PlayerUnit, PlayerGroup, PlayerName, "BRAA" )
end
- if self:IsA2A_BRA() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate BULLS", A2ACoordinateMenu, self.MenuGroupA2ASystem, self, PlayerUnit, PlayerGroup, PlayerName, "BULLS" )
+ if self:IsA2A_BRAA() then
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Bullseye (BULLS)", A2ACoordinateMenu, self.MenuGroupA2ASystem, self, PlayerUnit, PlayerGroup, PlayerName, "BULLS" )
end
local MetricsMenu = MENU_GROUP:New( PlayerGroup, "Measures and Weights System", PlayerMenu )
if self:IsMetric() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate Imperial", MetricsMenu, self.MenuGroupMWSystem, self, PlayerUnit, PlayerGroup, PlayerName, false )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Imperial (Miles,Feet)", MetricsMenu, self.MenuGroupMWSystem, self, PlayerUnit, PlayerGroup, PlayerName, false )
end
if self:IsImperial() then
- MENU_GROUP_COMMAND:New( PlayerGroup, "Activate Metric", MetricsMenu, self.MenuGroupMWSystem, self, PlayerUnit, PlayerGroup, PlayerName, true )
+ MENU_GROUP_COMMAND:New( PlayerGroup, "Metric (Kilometers,Meters)", MetricsMenu, self.MenuGroupMWSystem, self, PlayerUnit, PlayerGroup, PlayerName, true )
end
return self
@@ -372,40 +362,45 @@ do -- SETTINGS
--- @param #SETTINGS self
- function SETTINGS:A2GMenuSystem( A2GSystem )
+ function SETTINGS:A2GMenuSystem( MenuGroup, RootMenu, A2GSystem )
self.A2GSystem = A2GSystem
- self:SetSystemMenu()
+ MESSAGE:New( string.format("Settings: Default A2G coordinate system set to %s for all players!.", A2GSystem ), 5 ):ToAll()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
--- @param #SETTINGS self
- function SETTINGS:A2AMenuSystem( A2ASystem )
+ function SETTINGS:A2AMenuSystem( MenuGroup, RootMenu, A2ASystem )
self.A2ASystem = A2ASystem
- self:SetSystemMenu()
+ MESSAGE:New( string.format("Settings: Default A2A coordinate system set to %s for all players!.", A2ASystem ), 5 ):ToAll()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
--- @param #SETTINGS self
- function SETTINGS:MenuLL_Accuracy( LL_Accuracy )
+ function SETTINGS:MenuLL_Accuracy( MenuGroup, RootMenu, LL_Accuracy )
self.LL_Accuracy = LL_Accuracy
- self:SetSystemMenu()
+ MESSAGE:New( string.format("Settings: Default LL accuracy set to %s for all players!.", LL_Accuracy ), 5 ):ToAll()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
--- @param #SETTINGS self
- function SETTINGS:MenuLL_DMS( LL_DMS )
+ function SETTINGS:MenuLL_DMS( MenuGroup, RootMenu, LL_DMS )
self.LL_DMS = LL_DMS
- self:SetSystemMenu()
+ MESSAGE:New( string.format("Settings: Default LL format set to %s for all players!.", LL_DMS or "Decimal" or "HMS" ), 5 ):ToAll()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
--- @param #SETTINGS self
- function SETTINGS:MenuMGRS_Accuracy( MGRS_Accuracy )
+ function SETTINGS:MenuMGRS_Accuracy( MenuGroup, RootMenu, MGRS_Accuracy )
self.MGRS_Accuracy = MGRS_Accuracy
- self:SetSystemMenu()
+ MESSAGE:New( string.format("Settings: Default MGRS accuracy set to %s for all players!.", MGRS_Accuracy ), 5 ):ToAll()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
--- @param #SETTINGS self
- function SETTINGS:MenuMWSystem( MW )
+ function SETTINGS:MenuMWSystem( MenuGroup, RootMenu, MW )
self.Metric = MW
MESSAGE:New( string.format("Settings: Default measurement format set to %s for all players!.", MW and "Metric" or "Imperial" ), 5 ):ToAll()
- self:SetSystemMenu()
+ self:SetSystemMenu( MenuGroup, RootMenu )
end
do
@@ -437,7 +432,7 @@ do -- SETTINGS
--- @param #SETTINGS self
function SETTINGS:MenuGroupLL_DMSSystem( PlayerUnit, PlayerGroup, PlayerName, LL_DMS )
self.LL_DMS = LL_DMS
- MESSAGE:New( string.format("Settings: A2G LL format mode set to %s for player %s.", LL_DMS and "DMS" or "HMS", PlayerName ), 5 ):ToGroup( PlayerGroup )
+ MESSAGE:New( string.format("Settings: A2G LL format mode set to %s for player %s.", LL_DMS and "Decimal" or "HMS", PlayerName ), 5 ):ToGroup( PlayerGroup )
self:RemovePlayerMenu(PlayerUnit)
self:SetPlayerMenu(PlayerUnit)
end
diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua
index 9c9bdd10a..6ba990e96 100644
--- a/Moose Development/Moose/Functional/CleanUp.lua
+++ b/Moose Development/Moose/Functional/CleanUp.lua
@@ -64,7 +64,7 @@
-- ## 3. Clean missiles and bombs within the airbase zone.
--
-- When missiles or bombs hit the runway, the airbase operations stop.
--- Use the method @{#CLEANUP.CleanMissilesOn}() to control the cleaning of missiles, which will prevent airbases to stop.
+-- Use the method @{#CLEANUP.SetCleanMissiles}() to control the cleaning of missiles, which will prevent airbases to stop.
-- Note that this method will not allow anymore airbases to be attacked, so there is a trade-off here to do.
--
-- @field #CLEANUP
@@ -148,7 +148,7 @@ end
-- @param #CLEANUP self
-- @param #string CleanMissiles (Default=true) If true, missiles fired are immediately destroyed. If false missiles are not controlled.
-- @return #CLEANUP
-function CLEANUP:CleanMissilesOn( CleanMissiles )
+function CLEANUP:SetCleanMissiles( CleanMissiles )
if CleanMissiles or true then
self:HandleEvent( EVENTS.Shot, self.__.OnEventShot )
diff --git a/Moose Development/Moose/Moose.lua b/Moose Development/Moose/Moose.lua
index c0484b05f..25308e705 100644
--- a/Moose Development/Moose/Moose.lua
+++ b/Moose Development/Moose/Moose.lua
@@ -10,4 +10,4 @@ _SCHEDULEDISPATCHER = SCHEDULEDISPATCHER:New() -- Core.Timer#SCHEDULEDISPATCHER
_DATABASE = DATABASE:New() -- Core.Database#DATABASE
_SETTINGS = SETTINGS:Set()
-_SETTINGS:SetSystemMenu( nil )
+
diff --git a/Moose Development/Moose/Tasking/CommandCenter.lua b/Moose Development/Moose/Tasking/CommandCenter.lua
index 28688a32f..9c9139f9f 100644
--- a/Moose Development/Moose/Tasking/CommandCenter.lua
+++ b/Moose Development/Moose/Tasking/CommandCenter.lua
@@ -260,6 +260,8 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
)
self:SetMenu()
+
+ _SETTINGS:SetSystemMenu( CommandCenterPositionable )
return self
end
diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html
index 93a9f8ce6..43392b308 100644
--- a/docs/Documentation/AI_Patrol.html
+++ b/docs/Documentation/AI_Patrol.html
@@ -926,6 +926,9 @@ Use the method AIPATROLZONE.M
+
+ This table contains the targets detected during patrol.
+
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html
index 262969991..d774a472f 100644
--- a/docs/Documentation/Cargo.html
+++ b/docs/Documentation/Cargo.html
@@ -3059,6 +3059,7 @@ The range till cargo will board.
-
+ #number
CARGO_UNIT.RunCount
diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html
index c8e23a470..9066670dd 100644
--- a/docs/Documentation/CleanUp.html
+++ b/docs/Documentation/CleanUp.html
@@ -149,6 +149,12 @@
| CLEANUP:RemoveAirbase(AirbaseName) |
Removes an airbase from the airbase validation list.
+ |
+
+
+ | CLEANUP:SetCleanMissiles(CleanMissiles) |
+
+ Enables or disables the cleaning of missiles within the airbase zones.
|
@@ -229,8 +235,14 @@ But as a result, there is more CPU overload.
2. Add or Remove airbases
-The method CLEANUP.AddAirbase to add an airbase to the cleanup validation process.
-The method CLEANUP.RemoveAirbase removes an airbase from the cleanup validation process.
+The method CLEANUP.AddAirbase() to add an airbase to the cleanup validation process.
+The method CLEANUP.RemoveAirbase() removes an airbase from the cleanup validation process.
+
+3. Clean missiles and bombs within the airbase zone.
+
+When missiles or bombs hit the runway, the airbase operations stop.
+Use the method CLEANUP.SetCleanMissiles() to control the cleaning of missiles, which will prevent airbases to stop.
+Note that this method will not allow anymore airbases to be attacked, so there is a trade-off here to do.
@@ -328,6 +340,41 @@ CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )
#CLEANUP:
+
+
+
+-
+
+
+CLEANUP:SetCleanMissiles(CleanMissiles)
+
+
+-
+
+
Enables or disables the cleaning of missiles within the airbase zones.
+
+
+Airbase operations stop when a missile or bomb is dropped at a runway.
+Note that when this method is used, the airbase operations won't stop if
+the missile or bomb was cleaned within the airbase zone, which is 8km from the center of the airbase.
+However, there is a trade-off to make. Attacks on airbases won't be possible anymore if this method is used.
+Note, one can also use the method CLEANUP.RemoveAirbase() to remove the airbase from the control process as a whole,
+when an enemy unit is near. That is also an option...
+
+ Parameter
+
+ Return value
+
+#CLEANUP:
+
+
diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html
index 30e42f2ca..a07c91687 100644
--- a/docs/Documentation/Controllable.html
+++ b/docs/Documentation/Controllable.html
@@ -247,6 +247,12 @@
| CONTROLLABLE:GetLife0() |
Returns the initial health.
+ |
+
+
+ | CONTROLLABLE:GetSize() |
+
+
|
@@ -1526,6 +1532,19 @@ The controllable is not existing or alive.
+
+
+
+-
+
+
+CONTROLLABLE:GetSize()
+
+
+-
+
+
+
diff --git a/docs/Documentation/Designate.html b/docs/Documentation/Designate.html
index 70e3562df..c0c7ee573 100644
--- a/docs/Documentation/Designate.html
+++ b/docs/Documentation/Designate.html
@@ -900,7 +900,6 @@ function below will use the range 1-7 just in case
-
-
DESIGNATE.LaserCodes
diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html
index 1754d0aa0..d42c77032 100644
--- a/docs/Documentation/Detection.html
+++ b/docs/Documentation/Detection.html
@@ -2406,6 +2406,7 @@ The index of the DetectedItem.
-
+ #number
DETECTION_BASE.DetectedItemMax
@@ -2563,7 +2564,7 @@ The index of the DetectedItem.
-
- #number
+
DETECTION_BASE.DetectionInterval
diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html
index be5ce073c..4307c3aaa 100644
--- a/docs/Documentation/Movement.html
+++ b/docs/Documentation/Movement.html
@@ -227,7 +227,6 @@ on defined intervals (currently every minute).
-
- #number
MOVEMENT.AliveUnits
@@ -236,9 +235,6 @@ on defined intervals (currently every minute).
-
-
Contains the counter how many units are currently alive
-
diff --git a/docs/Documentation/Settings.html b/docs/Documentation/Settings.html
index 4dce02244..7dca37cbf 100644
--- a/docs/Documentation/Settings.html
+++ b/docs/Documentation/Settings.html
@@ -1073,7 +1073,7 @@ true if metric.
-
- #boolean
+
SETTINGS.Metric
diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html
index 0f27003d1..6161409ef 100644
--- a/docs/Documentation/Spawn.html
+++ b/docs/Documentation/Spawn.html
@@ -2194,9 +2194,6 @@ 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.
-
@@ -2746,9 +2743,6 @@ when nothing was spawned.
-
- By default, no InitLimit
-
@@ -2784,7 +2778,7 @@ when nothing was spawned.
-
- #number
+
SPAWN.SpawnMaxGroups
@@ -2801,7 +2795,7 @@ when nothing was spawned.
-
- #number
+
SPAWN.SpawnMaxUnitsAlive
@@ -3129,7 +3123,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
-
- #boolean
+
SPAWN.SpawnUnControlled
diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html
index d8aa5e633..bc91b9624 100644
--- a/docs/Documentation/SpawnStatic.html
+++ b/docs/Documentation/SpawnStatic.html
@@ -436,7 +436,6 @@ ptional) The name of the new static.
-
- #number
SPAWNSTATIC.SpawnIndex
diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html
index 5ea8d8586..ce9c5ff8f 100644
--- a/docs/Documentation/Task.html
+++ b/docs/Documentation/Task.html
@@ -552,7 +552,7 @@
- | TASK:SetInfo(TaskInfo, TaskInfoText) |
+ TASK:SetInfo(TaskInfo, TaskInfoText, TaskInfoOrder) |
Sets the Information on the Task
|
@@ -687,6 +687,12 @@
TASK.TaskID |
+ |
+
+
+ | TASK.TaskInfo |
+
+
|
@@ -2472,7 +2478,7 @@ self
-
-TASK:SetInfo(TaskInfo, TaskInfoText)
+TASK:SetInfo(TaskInfo, TaskInfoText, TaskInfoOrder)
-
@@ -2483,12 +2489,20 @@ self
-
-
#string TaskInfo :
+#string TaskInfo :
+The key and title of the task information.
-
-
TaskInfoText :
+#string TaskInfoText :
+The Task info text.
+
+
+ -
+
+
#number TaskInfoOrder :
+The ordering, a number between 0 and 99.
@@ -2978,6 +2992,19 @@ Fsm#FSM_PROCESS
+
+
+
+-
+
+
+TASK.TaskInfo
+
+
+-
+
+
+
diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html
index 8c17ced64..7d6a582bd 100644
--- a/docs/Documentation/Task_Cargo.html
+++ b/docs/Documentation/Task_Cargo.html
@@ -195,6 +195,12 @@ and various dedicated deployment zones.
| TASK_CARGO:GetDeployZones() |
+ |
+
+
+ | TASK_CARGO:GetGoalTotal() |
+
+
|
@@ -249,6 +255,12 @@ and various dedicated deployment zones.
| TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) |
+ |
+
+
+ | TASK_CARGO:SetGoalTotal() |
+
+
|
@@ -355,6 +367,12 @@ and various dedicated deployment zones.
| TASK_CARGO_TRANSPORT:__CargoPickedUp(Delay, TaskUnit, Cargo) |
Asynchronous Event Trigger for Event CargoPickedUp.
+ |
+
+
+ | TASK_CARGO_TRANSPORT:onafterGoal(TaskUnit, From, Event, To) |
+
+
|
@@ -510,7 +528,7 @@ based on the tasking capabilities defined in Task#TA
-
-
+ Core.Cargo#CARGO_GROUP
FSM_PROCESS.Cargo
@@ -524,6 +542,7 @@ based on the tasking capabilities defined in Task#TA
-
+
FSM_PROCESS.DeployZone
@@ -619,6 +638,19 @@ The Cargo Set.
#list:
Core.Zone#ZONE_BASE> The Deployment Zones.
+
+
+
+-
+
+
+TASK_CARGO:GetGoalTotal()
+
+
+-
+
+
+
@@ -875,6 +907,19 @@ ist DeployZones
#TASK_CARGO:
+
+
+
+-
+
+
+TASK_CARGO:SetGoalTotal()
+
+
+-
+
+
+
@@ -1480,6 +1525,42 @@ The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Sta
+
+
+-
+
+
+TASK_CARGO_TRANSPORT:onafterGoal(TaskUnit, From, Event, To)
+
+
+-
+
+
+
+
Parameters
+
+ -
+
+
TaskUnit :
+
+
+ -
+
+
From :
+
+
+ -
+
+
Event :
+
+
+ -
+
+
To :
+
+
+
+