mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Handle Weapon Items not in Box Virtual Items as Unique (#8375)
* Handle unique items that are also weapon attachments * only flatten once
This commit is contained in:
parent
ce705310e3
commit
a95e71fec8
@ -45,6 +45,10 @@ private _fnc_fill_right_Container = {
|
|||||||
private _cacheNamespace = _ctrlPanel;
|
private _cacheNamespace = _ctrlPanel;
|
||||||
private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []];
|
private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []];
|
||||||
|
|
||||||
|
if (!(_className in GVAR(virtualItemsFlat))) then {
|
||||||
|
_isUnique = true;
|
||||||
|
};
|
||||||
|
|
||||||
// Not in cache. So get info and put into cache
|
// Not in cache. So get info and put into cache
|
||||||
if (_cachedItemInfo isEqualTo []) then {
|
if (_cachedItemInfo isEqualTo []) then {
|
||||||
private _configPath = configFile >> _configCategory >> _className;
|
private _configPath = configFile >> _configCategory >> _className;
|
||||||
|
@ -107,6 +107,7 @@ GVAR(rightTabLnBFocus) = nil;
|
|||||||
|
|
||||||
GVAR(selectedWeaponType) = nil;
|
GVAR(selectedWeaponType) = nil;
|
||||||
GVAR(virtualItems) = nil;
|
GVAR(virtualItems) = nil;
|
||||||
|
GVAR(virtualItemsFlat) = nil;
|
||||||
GVAR(currentItems) = nil;
|
GVAR(currentItems) = nil;
|
||||||
GVAR(currentFace) = nil;
|
GVAR(currentFace) = nil;
|
||||||
GVAR(currentVoice) = nil;
|
GVAR(currentVoice) = nil;
|
||||||
|
@ -45,10 +45,12 @@ GVAR(currentBox) = _object;
|
|||||||
|
|
||||||
if (_mode) then {
|
if (_mode) then {
|
||||||
GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems));
|
GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems));
|
||||||
|
GVAR(virtualItemsFlat) = +(uiNamespace getVariable QGVAR(configItemsFlat));
|
||||||
} else {
|
} else {
|
||||||
GVAR(virtualItems) = +(_object getVariable [QGVAR(virtualItems), [
|
GVAR(virtualItems) = +(_object getVariable [QGVAR(virtualItems), [
|
||||||
[[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []
|
[[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []
|
||||||
]]);
|
]]);
|
||||||
|
GVAR(virtualItemsFlat) = flatten GVAR(virtualItems);
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(center) = _center;
|
GVAR(center) = _center;
|
||||||
|
@ -186,4 +186,5 @@ private _cfgMagazines = configFile >> "CfgMagazines";
|
|||||||
} foreach configProperties [(configFile >> "CfgMagazineWells"), "isClass _x", true];
|
} foreach configProperties [(configFile >> "CfgMagazineWells"), "isClass _x", true];
|
||||||
|
|
||||||
uiNamespace setVariable [QGVAR(configItems), _cargo];
|
uiNamespace setVariable [QGVAR(configItems), _cargo];
|
||||||
|
uiNamespace setVariable [QGVAR(configItemsFlat), flatten _cargo];
|
||||||
uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups];
|
uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups];
|
||||||
|
Loading…
Reference in New Issue
Block a user