diff --git a/addons/intelitems/XEH_preInit.sqf b/addons/intelitems/XEH_preInit.sqf index ff09f6ea0e9..e2914443cce 100644 --- a/addons/intelitems/XEH_preInit.sqf +++ b/addons/intelitems/XEH_preInit.sqf @@ -27,7 +27,7 @@ if (hasInterface) then { GVAR(controlsGroups) = []; // Hash to track controls group positions on map between closing - GVAR(controlsData) = [] call CBA_fnc_hashCreate; + GVAR(controlsData) = createHashMap; }; ADDON = true; diff --git a/addons/intelitems/functions/fnc_addActions.sqf b/addons/intelitems/functions/fnc_addActions.sqf index 6b93a54eb1d..5e1501a7f0d 100644 --- a/addons/intelitems/functions/fnc_addActions.sqf +++ b/addons/intelitems/functions/fnc_addActions.sqf @@ -20,7 +20,6 @@ params ["_player"]; private _actions = []; private _cfgMagazines = configFile >> "CfgMagazines"; -private _magazines = magazines _player; private _openIndices = GVAR(controlsGroups) apply {_x getVariable QGVAR(index)}; @@ -53,6 +52,6 @@ private _openIndices = GVAR(controlsGroups) apply {_x getVariable QGVAR(index)}; }; } forEach _magazineIds; }; -} forEach (_magazines arrayIntersect _magazines); +} forEach ([_player, 2] call EFUNC(common,uniqueItems)); _actions diff --git a/addons/intelitems/functions/fnc_createControl.sqf b/addons/intelitems/functions/fnc_createControl.sqf index b56d3f36819..5f8fc61ca9a 100644 --- a/addons/intelitems/functions/fnc_createControl.sqf +++ b/addons/intelitems/functions/fnc_createControl.sqf @@ -44,7 +44,7 @@ private _ctrlContent = _controlsGroup controlsGroupCtrl IDC_CONTENT; _ctrlContent ctrlSetText GET_DATA(_index); // Restore position of controls group (center if not saved) -private _position = [GVAR(controlsData), _index] call CBA_fnc_hashGet; +private _position = GVAR(controlsData) get _index; if (isNil "_position") then { ctrlPosition _controlsGroup params ["", "", "_posW", "_posH"]; diff --git a/addons/intelitems/functions/fnc_deleteControl.sqf b/addons/intelitems/functions/fnc_deleteControl.sqf index c2b986b21f7..4d7d9cd2e28 100644 --- a/addons/intelitems/functions/fnc_deleteControl.sqf +++ b/addons/intelitems/functions/fnc_deleteControl.sqf @@ -21,7 +21,7 @@ private _index = _controlsGroup getVariable QGVAR(index); // Save position of controls group ctrlPosition _controlsGroup params ["_posX", "_posY"]; -[GVAR(controlsData), _index, [_posX, _posY]] call CBA_fnc_hashSet; +GVAR(controlsData) set [_index, [_posX, _posY]]; // Update data if modified private _ctrlContent = _controlsGroup controlsGroupCtrl IDC_CONTENT; diff --git a/addons/intelitems/functions/fnc_handleLoadout.sqf b/addons/intelitems/functions/fnc_handleLoadout.sqf index f4e2ed5b25f..47d0077cc68 100644 --- a/addons/intelitems/functions/fnc_handleLoadout.sqf +++ b/addons/intelitems/functions/fnc_handleLoadout.sqf @@ -21,7 +21,6 @@ private _allIndices = []; // Handle magazine ids with missing index assignments private _cfgMagazines = configFile >> "CfgMagazines"; -private _magazines = magazines _player; { if (getNumber (_cfgMagazines >> _x >> QGVAR(intel)) == 1) then { @@ -39,7 +38,7 @@ private _magazines = magazines _player; }; } forEach _magazineIds; }; -} forEach (_magazines arrayIntersect _magazines); +} forEach ([_player, 2] call EFUNC(common,uniqueItems)); // Close any open controls if player no longer has needed magazine {