From bd585de1091711e42ea05c15c1f2f2f7b1ba70d4 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 28 Feb 2019 12:25:28 -0600 Subject: [PATCH] Activate all addons (#1081) --- addons/common/XEH_preInit.sqf | 2 +- addons/common/XEH_preStart.sqf | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 0b81d28c2..a407a7831 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -47,8 +47,8 @@ call COMPILE_FILE(init_perFrameHandler); call COMPILE_FILE(init_delayLess); // Due to activateAddons being overwritten by eachother (only the last executed command will be active), we apply this bandaid -activateAddons call (uiNamespace getVariable [QGVAR(unitAddons), {[]}]); GVAR(addons) = call (uiNamespace getVariable [QGVAR(addons), {[]}]); +activateAddons GVAR(addons); // BWC #include "backwards_comp.sqf" diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf index 8e76073b0..bd17e0236 100644 --- a/addons/common/XEH_preStart.sqf +++ b/addons/common/XEH_preStart.sqf @@ -3,21 +3,4 @@ //See usage in XEH_preInit private _cfgPatches = configFile >> "CfgPatches"; private _allComponents = "true" configClasses _cfgPatches apply {configName _x}; - -//Filter out addons that don't have any units defined as we don't need to activate these -private _unitAddons = _allComponents select { - !(getArray (_cfgPatches >> _x >> "units") isEqualTo []) -}; - -//Filter out addons defined in CfgAddons as they are always activated -private _allAddons = "true" configClasses (configFile >> "CfgAddons"); -private _preloadedAddons = []; - -{ - _preloadedAddons append (getArray (_x >> "list") apply {configName (_cfgPatches >> _x)}); -} forEach _allAddons; - -_unitAddons = _unitAddons - _preloadedAddons; - uiNamespace setVariable [QGVAR(addons), compileFinal str _allComponents]; -uiNamespace setVariable [QGVAR(unitAddons), compileFinal str _unitAddons];