From e7f6dbf95fb99ec247e456da0989bee0bdbaba6a Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 8 Aug 2023 16:57:00 +0200 Subject: [PATCH 1/2] Add Enabled Administrator UI setting --- x/ocap/addons/main/XEH_preInit.sqf | 25 +++++++++++++++++++ x/ocap/addons/recorder/fnc_adminUIcontrol.sqf | 2 ++ 2 files changed, 27 insertions(+) diff --git a/x/ocap/addons/main/XEH_preInit.sqf b/x/ocap/addons/main/XEH_preInit.sqf index 95eccbe..de1fd9d 100644 --- a/x/ocap/addons/main/XEH_preInit.sqf +++ b/x/ocap/addons/main/XEH_preInit.sqf @@ -59,6 +59,31 @@ GVAR(allSettings) = [ false // requires restart to apply ], + /* + CBA Setting: OCAP_enabledAdministratorUI + Description: + Turns on or off the Administrator UI in the briefing diary. Default: true + + Setting Name: + Administrator UI Enabled + + Value Type: + Boolean + */ + [ + QGVARMAIN(enabledAdministratorUI), + "CHECKBOX", // setting type + [ + "Administrator UI Enabled", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. + "Turns on or off the Administrator UI in the briefing diary. Default: true" + ], + [COMPONENT_NAME, "Core"], // Pretty name of the category where the setting can be found. Can be stringtable entry. + true, // default enabled + true, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer + {}, // function that will be executed once on mission start and every time the setting is changed. + false // requires restart to apply + ] + /* CBA Setting: OCAP_administratorList Description: diff --git a/x/ocap/addons/recorder/fnc_adminUIcontrol.sqf b/x/ocap/addons/recorder/fnc_adminUIcontrol.sqf index 3032f54..cb4a889 100644 --- a/x/ocap/addons/recorder/fnc_adminUIcontrol.sqf +++ b/x/ocap/addons/recorder/fnc_adminUIcontrol.sqf @@ -28,6 +28,8 @@ #include "script_component.hpp" +if (!GVARMAIN(enabledAdministratorUI)) exitWith {}; + params [ "_PID", ["_event", "", [""]] From e7e97d129403d8f3b1c4ce360cdae71717440402 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 8 Aug 2023 17:33:43 +0200 Subject: [PATCH 2/2] Fix missing comma --- x/ocap/addons/main/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/ocap/addons/main/XEH_preInit.sqf b/x/ocap/addons/main/XEH_preInit.sqf index de1fd9d..5696df1 100644 --- a/x/ocap/addons/main/XEH_preInit.sqf +++ b/x/ocap/addons/main/XEH_preInit.sqf @@ -82,7 +82,7 @@ GVAR(allSettings) = [ true, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer {}, // function that will be executed once on mission start and every time the setting is changed. false // requires restart to apply - ] + ], /* CBA Setting: OCAP_administratorList