params ["_vic"]; _vicDispName = configOf _vic call BIS_fnc_displayName; private _thisArr = []; // _thisArr pushBack getItemCargo _vic; // _thisArr pushBack getBackpackCargo _vic; // _thisArr pushBack getMagazineCargo _vic; // _thisArr pushBack getWeaponCargo _vic; private _ItemCargo = []; private _MagazineCargo = []; private _WeaponCargo = []; private _BackpackCargo = []; { private _config = _x call CBA_fnc_getItemConfig; _ItemCargo pushBack [ getText (_config >> "displayName"), getText (_config >> "picture") ]; } forEach ItemCargo _vic; { private _config = _x call CBA_fnc_getItemConfig; _MagazineCargo pushBack [ getText (_config >> "displayName"), getText (_config >> "picture") ]; } forEach MagazineCargo _vic; { // private _config = _x call CBA_fnc_getObjectConfig; _WeaponCargo pushBack [ getText (configFile >> "CfgWeapons" >> _x >> "displayName"), getText (configFile >> "CfgWeapons" >> _x >> "picture") ]; } forEach WeaponCargo _vic; { private _config = _x call CBA_fnc_getObjectConfig; _BackpackCargo pushBack [ getText (_config >> "displayName"), getText (_config >> "picture") ]; } forEach BackpackCargo _vic; private _sortedItemCargo = ([_ItemCargo call BIS_fnc_consolidateArray, [], {_x # 0 # 0}] call BIS_fnc_sortBy) select {!(_x # 0 # 0 isEqualTo "")}; private _sortedMagazineCargo = ([_MagazineCargo call BIS_fnc_consolidateArray, [], {_x # 0 # 0}] call BIS_fnc_sortBy) select {!(_x # 0 # 0 isEqualTo "")}; private _sortedWeaponCargo = ([_WeaponCargo call BIS_fnc_consolidateArray, [], {_x # 0 # 0}] call BIS_fnc_sortBy) select {!(_x # 0 # 0 isEqualTo "")}; private _sortedBackpackCargo = ([_BackpackCargo call BIS_fnc_consolidateArray, [], {_x # 0 # 0}] call BIS_fnc_sortBy) select {!(_x # 0 # 0 isEqualTo "")}; // "debug_console" callExtension(str _sortedItemCargo + "~0100"); // "debug_console" callExtension(str _sortedMagazineCargo + "~0100"); // "debug_console" callExtension(str _sortedWeaponCargo + "~0100"); // "debug_console" callExtension(str _sortedBackpackCargo + "~0100"); if (count _sortedItemCargo > 0) then { _thisArr pushBack format["Items:"]; private _itemCargoOut = []; { private _name = _x # 0 # 0; private _pic = _x # 0 # 1; private _count = _x # 1; if (_pic == "") then { _itemCargoOut pushBack format["%3 x%2", _pic, _count, _name]; } else { _itemCargoOut pushBack format["x%2", _pic, _count, _name]; }; if ((_forEachIndex + 1) mod 6 == 0) then {_itemCargoOut pushBack "
"}; } forEach _sortedItemCargo; _thisArr pushBack (_itemCargoOut joinString ""); }; if (count _sortedMagazineCargo > 0) then { _thisArr pushBack format["Magazines:"]; private _magCargoOut = []; { private _name = _x # 0 # 0; private _pic = _x # 0 # 1; private _count = _x # 1; if (_pic == "") then { _magCargoOut pushBack format["%3 x%2", _pic, _count, _name]; } else { _magCargoOut pushBack format["x%2", _pic, _count, _name]; }; if ((_forEachIndex + 1) mod 6 == 0) then {_magCargoOut pushBack "
"}; } forEach _sortedMagazineCargo; _thisArr pushBack (_magCargoOut joinString ""); }; if (count _sortedWeaponCargo > 0) then { _thisArr pushBack format["Weapons:"]; private _weaponCargoOut = []; { private _name = _x # 0 # 0; private _pic = _x # 0 # 1; private _count = _x # 1; if (_pic == "") then { _weaponCargoOut pushBack format["%3 x%2", _pic, _count, _name]; } else { _weaponCargoOut pushBack format["x%2", _pic, _count, _name]; }; if ((_forEachIndex + 1) mod 3 == 0) then {_weaponCargoOut pushBack "
"}; } forEach _sortedWeaponCargo; _thisArr pushBack (_weaponCargoOut joinString ""); }; if (count _sortedBackpackCargo > 0) then { _thisArr pushBack format["Backpacks:"]; private _backpackCargoOut = []; { private _name = _x # 0 # 0; private _pic = _x # 0 # 1; private _count = _x # 1; if (_pic == "") then { _backpackCargoOut pushBack format["%3 x%2", _pic, _count, _name]; } else { _backpackCargoOut pushBack format["x%2", _pic, _count, _name]; }; if ((_forEachIndex + 1) mod 4 == 0) then {_backpackCargoOut pushBack "
"}; } forEach _sortedBackpackCargo; _thisArr pushBack (_backpackCargoOut joinString ""); // "debug_console" callExtension(str _backpackCargoOut + "~0100"); }; // "debug_console" callExtension(str _thisArr + "~1100"); _thisArr;