From 6a70ab1ff4a0c90381e54315d34d979770e93975 Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 2 Jan 2018 14:57:19 +0100 Subject: [PATCH] allowFadeMusic setting --- addons/common/XEH_preInit.sqf | 12 +----------- .../functions/fnc_setHearingCapability.sqf | 2 +- addons/common/initSettings.sqf | 18 ++++++++++++++++++ addons/common/stringtable.xml | 8 ++++++++ 4 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 addons/common/initSettings.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 07e3a46df6..c29a0b5df4 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -27,8 +27,6 @@ GVAR(statusEffect_isGlobal) = []; GVAR(setHearingCapabilityMap) = []; -GVAR(setMusicVolume) = true; - ////////////////////////////////////////////////// // Set up PlayerChanged eventhandler for pre init (EH is installed in postInit) ////////////////////////////////////////////////// @@ -43,14 +41,6 @@ isHC = !hasInterface && !isDedicated; // deprecated because no tag missionNamespace setVariable ["ACE_isHC", ACE_isHC]; uiNamespace setVariable ["ACE_isHC", ACE_isHC]; -[ - QGVAR(persistentLaserEnabled), - "CHECKBOX", - [localize LSTRING(SettingPersistentLaserName), localize LSTRING(SettingPersistentLaserDesc)], - localize LSTRING(ACEKeybindCategoryWeapons), - false, - false, - LINKFUNC(switchPersistentLaser) -] call CBA_settings_fnc_init; +#include "initSettings.sqf" ADDON = true; diff --git a/addons/common/functions/fnc_setHearingCapability.sqf b/addons/common/functions/fnc_setHearingCapability.sqf index 3c6783c98e..5cfe81cc16 100644 --- a/addons/common/functions/fnc_setHearingCapability.sqf +++ b/addons/common/functions/fnc_setHearingCapability.sqf @@ -47,7 +47,7 @@ if (!_exists && _add) then { // in game sounds 0 fadeSound _lowestVolume; 0 fadeRadio _lowestVolume; -if (GVAR(setMusicVolume)) then { +if (GVAR(allowFadeMusic)) then { 0 fadeMusic _lowestVolume; }; diff --git a/addons/common/initSettings.sqf b/addons/common/initSettings.sqf new file mode 100644 index 0000000000..fcaa242ac3 --- /dev/null +++ b/addons/common/initSettings.sqf @@ -0,0 +1,18 @@ +[ + QGVAR(persistentLaserEnabled), + "CHECKBOX", + [LSTRING(SettingPersistentLaserName), LSTRING(SettingPersistentLaserDesc)], + localize LSTRING(ACEKeybindCategoryWeapons), + false, + false, + LINKFUNC(switchPersistentLaser) +] call CBA_settings_fnc_init; + +[ + QGVAR(allowFadeMusic), + "CHECKBOX", + [LSTRING(AllowFadeMusic), LSTRING(AllowFadeMusicTooltip)], + localize LSTRING(ACEKeybindCategoryCommon), + true, + true +] call CBA_settings_fnc_init; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 0876653721..c086247aae 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1151,5 +1151,13 @@ 重量: 重量: + + Allow muting music + Erlaube Musik stummschalten + + + Allow ACE scripts to mute the music. + Erlaube ACE-Skripten, die Musik stumm zu schalten. +