Module Settings
Core -- Manages various settings for MOOSE classes.
The documentation of the SETTINGS class can be found further in this document.
AUTHORS and CONTRIBUTIONS
Contributions:
Authors:
- FlightControl: Design & Programming
Global(s)
SETTINGS |
SETTINGS class, extends Base#BASEThe SETTINGS class takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework. |
Type SETTINGS
Global(s)
- #SETTINGS SETTINGS
-
SETTINGS class, extends Base#BASE
The SETTINGS class takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework.
The SETTINGS class takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework. SETTINGS can work on 2 levels:
- Default settings: A running mission has Default settings.
- Player settings: For each player its own Player settings can be defined, overriding the Default settings.
So, when there isn't any Player setting defined for a player for a specific setting, or, the player cannot be identified, the Default setting will be used instead.
1. _SETTINGS object
MOOSE defines by default a singleton object called _SETTINGS. Use this object to modify all the Default settings for a running mission. For each player, MOOSE will automatically allocate also a player settings object, and will expose a radio menu to allow the player to adapt the settings to his own preferences.
2. SETTINGS Menu
Settings can be adapted by the Players and by the Mission Administrator through radio menus, which are automatically available in the mission. These menus can be found on level F10 under "Settings". There are two kinds of menus generated by the system.
2.1. Default settings menu
A menu is created automatically per Command Center that allows to modify the Default settings. So, when joining a CC unit, a menu will be available that allows to change the settings parameters FOR ALL THE PLAYERS! Note that the Default settings will only be used when a player has not choosen its own settings.
2.2. Player settings menu
A menu is created automatically per Player Slot (group) that allows to modify the Player settings. So, when joining a slot, a menu wil be available that allows to change the settings parameters FOR THE PLAYER ONLY! Note that when a player has not chosen a specific setting, the Default settings will be used.
2.3. Show or Hide the Player Setting menus
Of course, it may be requried not to show any setting menus. In this case, a method is available on the _SETTINGS object. Use SETTINGS.SetPlayerMenuOff() to hide the player menus, and use SETTINGS.SetPlayerMenuOn() show the player menus. Note that when this method is used, any player already in a slot will not have its menus visibility changed. The option will only have effect when a player enters a new slot or changes a slot.
Example:
_SETTINGS:SetPlayerMenuOff() -- will disable the player menus. _SETTINGS:SetPlayerMenuOn() -- will enable the player menus. -- But only when a player exits and reenters the slot these settings will have effect!
3. Settings
There are different settings that are managed and applied within the MOOSE framework. See below a comprehensive description of each.
3.1. A2G coordinates display formatting
3.1.1. A2G coordinates setting types
Will customize which display format is used to indicate A2G coordinates in text as part of the Command Center communications.
- A2G BR: Bearing Range.
- A2G MGRS: The Military Grid Reference System. The accuracy can also be adapted.
- A2G LL DMS: Lattitude Longitude Degrees Minutes Seconds. The accuracy can also be adapted.
- A2G LL DDM: Lattitude Longitude Decimal Degrees Minutes. The accuracy can also be adapted.
3.1.2. A2G coordinates setting menu
The settings can be changed by using the Default settings menu on the Command Center or the Player settings menu on the Player Slot.
3.1.3. A2G coordinates setting methods
There are different methods that can be used to change the System settings using the _SETTINGS object.
- SETTINGS.SetA2G_BR(): Enable the BR display formatting by default.
- SETTINGS.SetA2G_MGRS(): Enable the MGRS display formatting by default. Use SETTINGS.SetMGRS_Accuracy() to adapt the accuracy of the MGRS formatting.
- SETTINGS.SetA2GLLDMS(): Enable the LL DMS display formatting by default. Use SETTINGS.SetLL_Accuracy() to adapt the accuracy of the Seconds formatting.
- SETTINGS.SetA2GLLDDM(): Enable the LL DDM display formatting by default. Use SETTINGS.SetLL_Accuracy() to adapt the accuracy of the Seconds formatting.
3.1.4. A2G coordinates setting - additional notes
One additional note on BR. In a situation when a BR coordinate should be given, but there isn't any player context (no player unit to reference from), the MGRS formatting will be applied!
3.2. A2A coordinates formatting
3.2.1. A2A coordinates setting types
Will customize which display format is used to indicate A2A coordinates in text as part of the Command Center communications.
- A2A BRAA: Bearing Range Altitude Aspect.
- A2A MGRS: The Military Grid Reference System. The accuracy can also be adapted.
- A2A LL DMS: Lattitude Longitude Degrees Minutes Seconds. The accuracy can also be adapted.
- A2A LL DDM: Lattitude Longitude Decimal Degrees and Minutes. The accuracy can also be adapted.
- A2A BULLS: Bullseye.
3.2.2. A2A coordinates setting menu
The settings can be changed by using the Default settings menu on the Command Center or the Player settings menu on the Player Slot.
3.2.3. A2A coordinates setting methods
There are different methods that can be used to change the System settings using the _SETTINGS object.
- SETTINGS.SetA2A_BRAA(): Enable the BR display formatting by default.
- SETTINGS.SetA2A_MGRS(): Enable the MGRS display formatting by default. Use SETTINGS.SetMGRS_Accuracy() to adapt the accuracy of the MGRS formatting.
- SETTINGS.SetA2ALLDMS(): Enable the LL DMS display formatting by default. Use SETTINGS.SetLL_Accuracy() to adapt the accuracy of the Seconds formatting.
- SETTINGS.SetA2ALLDDM(): Enable the LL DDM display formatting by default. Use SETTINGS.SetLL_Accuracy() to adapt the accuracy of the Seconds formatting.
- SETTINGS.SetA2A_BULLS(): Enable the BULLSeye display formatting by default.
3.2.4. A2A coordinates settings - additional notes
One additional note on BRAA. In a situation when a BRAA coordinate should be given, but there isn't any player context (no player unit to reference from), the MGRS formatting will be applied!
3.3. Measurements formatting
3.3.1. Measurements setting types
Will customize the measurements system being used as part as part of the Command Center communications.
- Metrics system: Applies the Metrics system ...
- Imperial system: Applies the Imperial system ...
3.3.2. Measurements setting menu
The settings can be changed by using the Default settings menu on the Command Center or the Player settings menu on the Player Slot.
3.3.3. Measurements setting methods
There are different methods that can be used to change the Default settings using the _SETTINGS object.
- SETTINGS.SetMetric(): Enable the Metric system.
- SETTINGS.SetImperial(): Enable the Imperial system.
3.4. Message display times
3.4.1. Message setting types
There are various Message Types that will influence the duration how long a message will appear as part of the Command Center communications.
- Update message: A short update message.
- Information message: Provides new information while executing a mission.
- Briefing message: Provides a complete briefing before executing a mission.
- Overview report: Provides a short report overview, the summary of the report.
- Detailed report: Provides a complete report.
3.4.2. Message setting menu
The settings can be changed by using the Default settings menu on the Command Center or the Player settings menu on the Player Slot.
Each Message Type has specific timings that will be applied when the message is displayed. The Settings Menu will provide for each Message Type a selection of proposed durations from which can be choosen. So the player can choose its own amount of seconds how long a message should be displayed of a certain type. Note that Update messages can be chosen not to be displayed at all!
3.4.3. Message setting methods
There are different methods that can be used to change the System settings using the _SETTINGS object.
- SETTINGS.SetMessageTime(): Define for a specific Message.MESSAGE.MessageType the duration to be displayed in seconds.
- SETTINGS.GetMessageTime(): Retrieves for a specific Message.MESSAGE.MessageType the duration to be displayed in seconds.
Type Settings
Type SETTINGS
Field(s)
- SETTINGS:A2AMenuSystem(MenuGroup, RootMenu, A2ASystem)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
A2ASystem
:
-
- #string SETTINGS.A2ASystem
- SETTINGS:A2GMenuSystem(MenuGroup, RootMenu, A2GSystem)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
A2GSystem
:
-
- #string SETTINGS.A2GSystem
- SETTINGS:GetLL_DDM_Accuracy()
-
Gets the SETTINGS LL accuracy.
Return value
#number:
- SETTINGS:GetMGRS_Accuracy()
-
Gets the SETTINGS MGRS accuracy.
Return value
#number:
- SETTINGS:GetMessageTime(MessageType)
-
Gets the SETTINGS Message Display Timing of a MessageType
Parameter
-
Core.Message#MESSAGE MessageType
: The type of the message.
Return value
#number:
-
- SETTINGS:IsA2A_BRAA()
-
Is BRA
Return value
#boolean: true if BRA
- SETTINGS:IsA2A_BULLS()
-
Is BULLS
Return value
#boolean: true if BULLS
- SETTINGS:IsA2A_LL_DDM()
-
Is LL DDM
Return value
#boolean: true if LL DDM
- SETTINGS:IsA2A_LL_DMS()
-
Is LL DMS
Return value
#boolean: true if LL DMS
- SETTINGS:IsA2A_MGRS()
-
Is MGRS
Return value
#boolean: true if MGRS
- SETTINGS:IsA2G_BR()
-
Is BRA
Return value
#boolean: true if BRA
- SETTINGS:IsA2G_LL_DDM()
-
Is LL DDM
Return value
#boolean: true if LL DDM
- SETTINGS:IsA2G_LL_DMS()
-
Is LL DMS
Return value
#boolean: true if LL DMS
- SETTINGS:IsA2G_MGRS()
-
Is MGRS
Return value
#boolean: true if MGRS
- SETTINGS:IsImperial()
-
Gets if the SETTINGS is imperial.
Return value
#boolean: true if imperial.
- SETTINGS:IsMetric()
-
Gets if the SETTINGS is metric.
Return value
#boolean: true if metric.
- SETTINGS:MenuGroupA2ASystem(PlayerUnit, PlayerGroup, PlayerName, A2ASystem)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
A2ASystem
:
-
- SETTINGS:MenuGroupA2GSystem(PlayerUnit, PlayerGroup, PlayerName, A2GSystem)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
A2GSystem
:
-
- SETTINGS:MenuGroupLL_DDM_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
LL_Accuracy
:
-
- SETTINGS:MenuGroupMGRS_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
MGRS_Accuracy
:
-
- SETTINGS:MenuGroupMWSystem(PlayerUnit, PlayerGroup, PlayerName, MW)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
MW
:
-
- SETTINGS:MenuGroupMessageTimingsSystem(PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime)
-
Parameters
-
PlayerUnit
: -
PlayerGroup
: -
PlayerName
: -
MessageType
: -
MessageTime
:
-
- SETTINGS:MenuLL_DDM_Accuracy(MenuGroup, RootMenu, LL_Accuracy)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
LL_Accuracy
:
-
- SETTINGS:MenuMGRS_Accuracy(MenuGroup, RootMenu, MGRS_Accuracy)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
MGRS_Accuracy
:
-
- SETTINGS:MenuMWSystem(MenuGroup, RootMenu, MW)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
MW
:
-
- SETTINGS:MenuMessageTimingsSystem(MenuGroup, RootMenu, MessageType, MessageTime)
-
Parameters
-
MenuGroup
: -
RootMenu
: -
MessageType
: -
MessageTime
:
-
- #boolean SETTINGS.Metric
- SETTINGS.RemovePlayerMenu(PlayerUnit, self)
-
Removes the player menu from the PlayerUnit.
- @param #SETTINGS self
Parameters
-
Wrapper.Client#CLIENT PlayerUnit
: -
self
:
Return value
#SETTINGS: self
- SETTINGS:Set(PlayerName)
-
SETTINGS constructor.
Parameter
-
PlayerName
:
Return value
-
- SETTINGS:SetA2A_BRAA()
-
Sets A2A BRA
Return value
- SETTINGS:SetA2A_BULLS()
-
Sets A2A BULLS
Return value
- SETTINGS:SetA2A_LL_DDM()
-
Sets A2A LL DDM
Return value
- SETTINGS:SetA2A_LL_DMS()
-
Sets A2A LL DMS
Return value
- SETTINGS:SetA2A_MGRS()
-
Sets A2A MGRS
Return value
- SETTINGS:SetA2G_BR()
-
Sets A2G BRA
Return value
- SETTINGS:SetA2G_LL_DDM()
-
Sets A2G LL DDM
Return value
- SETTINGS:SetA2G_LL_DMS()
-
Sets A2G LL DMS
Return value
- SETTINGS:SetA2G_MGRS()
-
Sets A2G MGRS
Return value
- SETTINGS:SetImperial()
-
Sets the SETTINGS imperial.
- SETTINGS:SetLL_Accuracy(LL_Accuracy)
-
Sets the SETTINGS LL accuracy.
Parameter
-
#number LL_Accuracy
:
Return value
-
- SETTINGS:SetMGRS_Accuracy(MGRS_Accuracy)
-
Sets the SETTINGS MGRS accuracy.
Parameter
-
#number MGRS_Accuracy
:
Return value
-
- SETTINGS:SetMessageTime(MessageType, MessageTime)
-
Sets the SETTINGS Message Display Timing of a MessageType
Parameters
-
Core.Message#MESSAGE MessageType
: The type of the message. -
#number MessageTime
: The display time duration in seconds of the MessageType.
-
- SETTINGS:SetMetric()
-
Sets the SETTINGS metric.
- SETTINGS:SetPlayerMenu(PlayerUnit)
-
Updates the menu of the player seated in the PlayerUnit.
Parameter
-
Wrapper.Client#CLIENT PlayerUnit
:
Return value
#SETTINGS: self
-
- SETTINGS:SetPlayerMenuOff()
-
Sets the player menus off, so that the Player setting menus won't show up for the players.
But only when a player exits and reenters the slot these settings will have effect! It is advised to use this method at the start of the mission.
Return value
#SETTINGS: self
Usage:
_SETTINGS:SetPlayerMenuOff() -- will disable the player menus.
- SETTINGS:SetPlayerMenuOn()
-
Sets the player menus on, so that the Player setting menus show up for the players.
But only when a player exits and reenters the slot these settings will have effect! It is advised to use this method at the start of the mission.
Return value
Usage:
_SETTINGS:SetPlayerMenuOn() -- will enable the player menus.
- SETTINGS:SetSystemMenu(MenuGroup, RootMenu)
-
Parameters
-
MenuGroup
: -
RootMenu
:
Return value
-
- #boolean SETTINGS.ShowPlayerMenu