mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1706 from jonpas/settingsBFT
Blue Force Tracking ACE_Settings
This commit is contained in:
commit
b78ece7114
@ -49,6 +49,12 @@ class CfgVehicles {
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Enabled {
|
||||
displayName = CSTRING(BFT_Enabled_DisplayName);
|
||||
description = CSTRING(BFT_Enabled_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Interval {
|
||||
displayName = CSTRING(BFT_Interval_DisplayName);
|
||||
description = CSTRING(BFT_Interval_Description);
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
// Exit on Headless as well
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
LOG(MSG_INIT);
|
||||
|
||||
// Calculate the maximum zoom allowed for this map
|
||||
@ -19,4 +21,10 @@ call FUNC(determineZoom);
|
||||
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}];
|
||||
};
|
||||
|
||||
ADDON = true;
|
||||
["SettingsInitialized", {
|
||||
// Start Blue Force Tracking if Enabled
|
||||
if (GVAR(BFT_Enabled)) then {
|
||||
GVAR(BFT_markers) = [];
|
||||
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
@ -18,13 +18,9 @@ PARAMS_3(_logic,_units,_activated);
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
GVAR(BFT_Enabled) = true;
|
||||
[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
|
||||
TRACE_2("[ACE]: Blue Force Tracking Module initialized.",GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
|
||||
|
||||
//start BFT:
|
||||
GVAR(BFT_markers) = [];
|
||||
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
|
||||
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(isServer) exitWith {};
|
||||
|
||||
PARAMS_3(_logic,_units,_activated);
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
@ -19,4 +21,4 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Interaction Module Initialized.";
|
||||
diag_log text "[ACE]: Map Module Initialized.";
|
||||
|
@ -77,6 +77,12 @@
|
||||
<German>Blue Force Tracking</German>
|
||||
<Czech>Blue Force Tracking</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_BFT_Enabled_DisplayName">
|
||||
<English>BFT Enable</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_BFT_Enabled_Description">
|
||||
<English>Enable Blue Force Tracking. Default: No</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_BFT_Interval_DisplayName">
|
||||
<English>Interval</English>
|
||||
<Polish>Interwał</Polish>
|
||||
|
Loading…
Reference in New Issue
Block a user