From 29d11bc75206a212e3cb4f74d98da995dc3a02cb Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Mon, 6 Aug 2018 06:15:49 +0200 Subject: [PATCH] Fix terminals not being properly added to currentItems (#6504) --- addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf | 13 ++++++++++--- addons/arsenal/functions/fnc_onArsenalOpen.sqf | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf index 131bc1331f..9146246fa9 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf @@ -76,10 +76,17 @@ for "_index" from 0 to 15 do { }; { private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); - private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); - GVAR(currentItems) set [_index, _x]; -} foreach (assignedItems GVAR(center)); + if (_simulationType != "NVGoggles") then { + if (_simulationType == "ItemGps" || _simulationType == "Weapon") then { + GVAR(currentItems) set [14, _x]; + } else { + + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType)); + GVAR(currentItems) set [_index, _x]; + }; + }; +} forEach (assignedItems GVAR(center)); call FUNC(updateUniqueItemsList); diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index f61a60e2c1..b18d3c3080 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -165,9 +165,16 @@ for "_index" from 0 to 15 do { { private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); - private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); - GVAR(currentItems) set [_index, _x]; + if (_simulationType != "NVGoggles") then { + if (_simulationType == "ItemGps" || _simulationType == "Weapon") then { + GVAR(currentItems) set [14, _x]; + } else { + + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType)); + GVAR(currentItems) set [_index, _x]; + }; + }; } forEach (assignedItems GVAR(center)); GVAR(currentWeaponType) = switch true do {