diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index eff1cf4c52..0cfda46128 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -192,6 +192,7 @@ class CfgVehicles { scope = 2; icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa)); isGlobal = 1; + isSingular = 1; class Arguments { class allowHandcuffOwnSide { displayName = CSTRING(ModuleSettings_handcuffSide_name); diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 56e3aee2c2..1204c35496 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QFUNC(moduleSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 7c5c9295f9..de1f7f7cf4 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -35,6 +35,7 @@ class CfgVehicles { function = QFUNC(moduleCheckPBOs); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); class Arguments { class Action { diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 2c4a78254a..615222678b 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -194,9 +194,17 @@ call FUNC(checkFiles); ACE_LOGINFO("Settings received from server."); + if (isServer) then { //read settings from paramsArray + [] call FUNC(readSettingsFromParamsArray); + }; // Event so that ACE_Modules have their settings loaded: ["InitSettingsFromModules", []] call FUNC(localEvent); + if (isServer) then { + // Publish all settings data after all configs and modules are read + publicVariable QGVAR(settings); + }; + // Load user settings from profile if (hasInterface) then { call FUNC(loadSettingsFromProfile); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index a9b10c4896..4c912e98b4 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -139,6 +139,7 @@ PREP(playerSide); PREP(positionToASL); PREP(progressBar); PREP(readSettingFromModule); +PREP(readSettingsFromParamsArray); PREP(receiveRequest); PREP(removeCanInteractWithCondition); PREP(removeSpecificMagazine); diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 1e43359379..7b05902862 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -35,12 +35,23 @@ _fnc_parseConfigForDisplayNames = { _values set [_forEachIndex, _text]; }; } forEach _values; + + if (!(_values isEqualTo [])) then { + if (_typeOf != "SCALAR") then { + ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); + } else { + private _value = missionNamespace getVariable [_name, -1]; + if ((_value < 0) || {_value >= (count _values)}) then { + ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values); + }; + }; + }; true }; // Iterate through settings { - _x params ["_name"]; + _x params ["_name", "_typeOf"]; if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then { diff --git a/addons/common/functions/fnc_loadSettingsOnServer.sqf b/addons/common/functions/fnc_loadSettingsOnServer.sqf index ea8257ec23..cdf8b48041 100644 --- a/addons/common/functions/fnc_loadSettingsOnServer.sqf +++ b/addons/common/functions/fnc_loadSettingsOnServer.sqf @@ -51,8 +51,6 @@ _fnc_parseConfigForSettings = { // mission side settings [missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings; -// Publish all settings data -publicVariable QGVAR(settings); // Publish all setting values { publicVariable (_x select 0); diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf new file mode 100644 index 0000000000..d1fdb30b29 --- /dev/null +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -0,0 +1,63 @@ +/* + * Author: PabstMirror + * Read settins from paramsArray that have a ACE_setting = 1. + * Happens before modules but after all other configs (for force priority) + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_common_fnc_readSettingsFromParamsArray + * + * Public: No + */ +#include "script_component.hpp" + +//paramsArray is a normal variable not a command +private _paramsArray = missionnamespace getvariable ["paramsArray", []]; + +TRACE_1("Reading missionConfigFile params",_paramsArray); + +{ + private _config = (missionConfigFile >> "params") select _forEachIndex; + if ((getNumber (_config >> "ACE_setting")) > 0) then { + private _settingName = configName _config; + private _settingValue = _x; + private _title = getText (_config >> "title"); + + TRACE_3("ace_setting",_title,_settingName,_settingValue); + + // Check if the variable is already defined + if (isNil _settingName) exitWith { + ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); + }; + + private _settingData = [_settingName] call FUNC(getSettingData); + _settingData params ["", "_typeName", "", "", "", "", "_isForced"]; + + // Check if it's already forced and quit + if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);}; + + // The setting is not forced, so update the value + // Read entry and cast it to the correct type from the existing variable + private _validValue = false; + switch (true) do { + case (_typeName == "SCALAR"): {_validValue = true;}; + case (_typeName == "BOOL"): { + _settingValue = _settingValue > 0; + _validValue = true; + }; + //TODO: Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings) + }; + + if (!_validValue) exitWith { + ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); + }; + + // Update the variable globaly and Force + [_settingName, _settingValue, true, true] call FUNC(setSetting); + }; +} foreach _paramsArray; diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 60b64e31d4..9d3a42326c 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -13,27 +13,39 @@ * Return Value: * None * + * Example: + * ["ace_map_gestures_enabled", true, false, true] call ace_common_fnc_setSetting + * * Public: No */ #include "script_component.hpp" params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; -private ["_settingData", "_failed"]; - -_settingData = [_name] call FUNC(getSettingData); +private _settingData = [_name] call FUNC(getSettingData); // Exit if the setting does not exist -if (count _settingData == 0) exitWith {}; +if (_settingData isEqualTo []) exitWith { + ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name); +}; + +_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; // Exit if the setting is already forced -if (_settingData select 6) exitWith {}; +if (_isForced) exitWith { + ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name); +}; + +//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status +if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then { + ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force); +}; // If the type is not equal, try to cast it -_failed = false; +private _failed = false; if (typeName _value != _settingData select 1) then { _failed = true; - if (_settingData select 1 == "BOOL" && typeName _value == "SCALAR") then { + if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then { // If value is not 0 or 1 consider it invalid and don't set anything if (_value isEqualTo 0) then { _value = false; @@ -44,12 +56,12 @@ if (typeName _value != _settingData select 1) then { _failed = false; }; }; - if (_settingData select 1 == "COLOR" && typeName _value == "ARRAY") then { + if ((_typeName == "COLOR") && {typeName _value == "ARRAY"}) then { _failed = false; }; }; -if (_failed) exitWith {}; +if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);}; // Force it if it was required _settingData set [6, _force]; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index a27efae704..b651903f59 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -6,6 +6,7 @@ class ACE_ModuleExplosive: ACE_Module { function = QUOTE(FUNC(module)); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); class Arguments { class RequireSpecialist { diff --git a/addons/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp index 99d9713f00..e78ef50123 100644 --- a/addons/finger/CfgVehicles.hpp +++ b/addons/finger/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa)); function = QFUNC(moduleSettings); isGlobal = 0; + isSingular = 1; author = ECSTRING(common,ACETeam); class Arguments { class enabled { diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index 2273653c3a..72377ca970 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -101,6 +101,7 @@ class CfgVehicles { function = QFUNC(moduleHearing); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Hearing_ca.paa); class Arguments { class EnableCombatDeafness { diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 56fb06a85b..dfe4f2025e 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = "ACE_Interaction_fnc_moduleInteraction"; scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Interaction_ca.paa); class Arguments { diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 7906de8bb7..720d4e8a7b 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -23,6 +23,7 @@ class CfgVehicles { function = QFUNC(moduleMap); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Map_ca.paa); class Arguments { class MapIllumination { @@ -82,6 +83,7 @@ class CfgVehicles { function = QFUNC(blueForceTrackingModule); scope = 2; isGlobal = 0; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index f5c2ae8f38..d4c88883e6 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -6,11 +6,13 @@ class CfgVehicles { displayName = CSTRING(moduleSettings_displayName); function = QFUNC(moduleSettings); isGlobal = 0; + isSingular = 1; author = ECSTRING(common,ACETeam); icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { class enabled { displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_description); typeName = "BOOL"; defaultValue = 1; }; @@ -18,7 +20,7 @@ class CfgVehicles { displayName = CSTRING(maxRange_displayName); description = CSTRING(maxRange_description); typeName = "NUMBER"; - defaultValue = 4; + defaultValue = 7; }; class interval { displayName = CSTRING(interval_displayName); @@ -30,13 +32,13 @@ class CfgVehicles { displayName = CSTRING(defaultLeadColor_displayName); description = CSTRING(defaultLeadColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.95"; }; class defaultColor { displayName = CSTRING(defaultColor_displayName); description = CSTRING(defaultColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.7"; }; }; }; @@ -53,13 +55,13 @@ class CfgVehicles { displayName = CSTRING(leadColor_displayName); description = CSTRING(leadColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.95"; }; class color { displayName = CSTRING(color_displayName); description = CSTRING(color_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.7"; }; }; }; diff --git a/addons/map_gestures/XEH_postInit.sqf b/addons/map_gestures/XEH_postInit.sqf index 777463e86a..233ee23c04 100644 --- a/addons/map_gestures/XEH_postInit.sqf +++ b/addons/map_gestures/XEH_postInit.sqf @@ -1,8 +1,13 @@ #include "script_component.hpp" +if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith { + ACE_LOGWARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]"); +}; + if (!hasInterface) exitWith {}; ["SettingsInitialized", { + if (!GVAR(enabled)) exitWith {}; [{ if (isNull (findDisplay 12)) exitWith {}; diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 99583074fc..56d3235d03 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -private ["_defaultColor", "_defaultLeadColor"]; - params ["_logic", "", "_activated"]; if (!_activated || !isServer) exitWith {}; @@ -27,11 +25,19 @@ if (!_activated || !isServer) exitWith {}; [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); -_defaultLeadColor = call compile ("[" + (_logic getVariable ["defaultLeadColor", ""]) + "]"); -if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; +//For default fallback colors, setting to empty ("") will not force on clients +private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; +if (_defaultLeadColor != "") then { + _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); + if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; + [QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); +}; -_defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]"); -if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; +private _defaultColor = _logic getVariable ["defaultColor", ""]; +if (_defaultColor != "") then { + _defaultColor = call compile ("[" + _defaultColor + "]"); + if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; + [QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); +}; -[QGVAR(defaultLeadColor), _defaultLeadColor, false, true] call EFUNC(common,setSetting); -[QGVAR(defaultColor), _defaultColor, false, true] call EFUNC(common,setSetting); +ACE_LOGINFO("Map Gestures Module Initialized."); diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 1555307e90..83ff9c4a86 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -21,33 +21,13 @@ Distância max. entre os jogadores para mostrar o indicador de gesto no mapa [padrão: 7 metros] Макс. дистанция между игроками для отображения жестов на карте [по-умолчанию: 7 метров] - - Lead Default Alpha - Transparência padrão do líder - Лид. прозрачность по-умолчанию - - - Fallback Alpha value for group leaders. - Valor de transparência alternativo para líderes de grupo - Значение прозрачности для лидеров групп. - - - Default Alpha - Transparência padrão - Прозрачность по-умолчанию - - - Fallback Alpha value. - Valor alternativo de transparência - Значение прозрачности по-умолчанию. - Lead Default Color Cor padrão para o líder Лид. цвет по-умолчанию - Fallback Color value for group leaders. + Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients] Valor de cor alternativa para líderes de grupo Значение цвета для лидеров групп. @@ -57,30 +37,10 @@ Цвет по-умолчанию - Fallback Color value. + Fallback Color value when there is no group setting. [Module: leave blank to not force on clients] Valor alternativo de cor Значение цвета. - - Lead Alpha - Transparência do líder - Лид. прозрачность - - - Alpha value for group leaders of groups synced with this module. - Valor de transparência para líderes de grupo sincronizados com este módulo. - Значение прозрачности для лидеров групп, которые [группы] синхронизированы с этим модулем. - - - Alpha - Transparência - Прозрачность - - - Alpha value for group members of groups synced with this module. - Valor de transparência para membros de grupo sincronizados com este módulo. - Значение прозрачности для членов групп, которые [группы] синхронизированы с этим модулем. - Lead Color Cor do líder diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 3a675e9258..351d285c7e 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -17,6 +17,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleMedicalSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); @@ -153,6 +154,7 @@ class CfgVehicles { function = QUOTE(FUNC(moduleAdvancedMedicalSettings)); functionPriority = 10; isGlobal = 2; + isSingular = 1; isTriggerActivated = 0; isDisposable = 0; author = ECSTRING(common,ACETeam); @@ -274,6 +276,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleReviveSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); diff --git a/addons/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp index 7bbe7db2ad..d2bbf55fd1 100644 --- a/addons/medical_menu/CfgVehicles.hpp +++ b/addons/medical_menu/CfgVehicles.hpp @@ -10,6 +10,7 @@ class CfgVehicles { function = QUOTE(DFUNC(module)); functionPriority = 1; isGlobal = 0; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index ee16870fe0..3fcf92beaa 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -38,6 +38,7 @@ class CfgVehicles { function = QFUNC(moduleMapFill); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_microDAGR_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index b351e440b4..481687f89f 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -52,6 +52,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_mk6_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 62d16f42ce..1935714dc8 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -4,27 +4,32 @@ ["InitSettingsFromModules", { // TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. // We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. + + private _uniqueModulesHandled = []; { [_x] call { - private ["_logic", "_logicType", "_config", "_isGlobal", "_isDisposable", "_isPersistent","_function"]; - _logic = _this select 0; - _logicType = typeof _logic; + params ["_logic"]; + private _logicType = typeof _logic; _logic hideobject true; if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; - _config = (configFile >> "CfgVehicles" >> _logicType); + private _config = (configFile >> "CfgVehicles" >> _logicType); if !(isClass _config) exitwith {}; - // isGlobal = 1; - _isGlobal = getNumber (_config >> "isGlobal") > 0; - _isDisposable = getNumber (_config >> "isDisposable") > 0; - _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; - _function = getText (_config >> "function"); + private _isGlobal = getNumber (_config >> "isGlobal") > 0; + private _isDisposable = getNumber (_config >> "isDisposable") > 0; + private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; + private _isSingular = getNumber (_config >> "isSingular") > 0; + private _function = getText (_config >> "function"); if (isnil _function) then { _function = compile _function; } else { _function = missionNamespace getvariable _function; }; + if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? + ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); + }; + if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; if (_isGlobal || isServer) then { [_logic, (synchronizedObjects _logic), true] call _function; @@ -38,7 +43,7 @@ deleteVehicle _logic; }; }; - }foreach GVAR(moduleInitCollection); + } forEach GVAR(moduleInitCollection); if (isServer) then { GVAR(serverModulesRead) = true; diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index f6e28095b4..7ca13b5aeb 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { function = QFUNC(moduleNameTags); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_NameTags_ca.paa)); class Arguments { class showPlayerNames { diff --git a/addons/optionsmenu/CfgVehicles.hpp b/addons/optionsmenu/CfgVehicles.hpp index 1357417add..cbe03a4cfb 100644 --- a/addons/optionsmenu/CfgVehicles.hpp +++ b/addons/optionsmenu/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleAllowConfigExport)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index ee31e2c873..85abce4028 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -25,6 +25,7 @@ class CfgVehicles { function = QFUNC(moduleRepairSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(Common,ACETeam); class Arguments { diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index 4ac0d0edb7..cb2422bd6d 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); class Arguments { class enable { diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 9e6f155616..873c875f09 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -74,6 +74,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp index 8e4e30d266..86d906bfce 100644 --- a/addons/viewdistance/CfgVehicles.hpp +++ b/addons/viewdistance/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { displayName = CSTRING(Module_DisplayName); scope = 2; isGlobal = 1; + isSingular = 1; //icon = ""; // needs an icon class Arguments { class moduleViewDistanceEnabled { diff --git a/addons/weather/CfgVehicles.hpp b/addons/weather/CfgVehicles.hpp index ebdd65c30d..f37a62449a 100644 --- a/addons/weather/CfgVehicles.hpp +++ b/addons/weather/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/winddeflection/CfgVehicles.hpp b/addons/winddeflection/CfgVehicles.hpp index 2694bb1b34..c52949e1fc 100644 --- a/addons/winddeflection/CfgVehicles.hpp +++ b/addons/winddeflection/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 35c43b0e84..f5144e60e6 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -23,6 +23,7 @@ class CfgVehicles { function = QFUNC(moduleZeusSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = "SilentSpike"; class Arguments {