ACE3/addons/disarming/functions/fnc_getAllGearContainer.sqf

30 lines
619 B
Plaintext
Raw Normal View History

/*
* Author: PabstMirror
* Helper function to get all gear of a container
*
* Arguments:
* 0: Container <OBJECT>
*
* Return Value:
* Array of 2 arrays, classnames and count<ARRAY>
*
* Example:
* [["ace_bandage"],[2]] = [box] call ace_disarming_fnc_getAllGearContainer
*
* Public: No
*/
2015-02-27 21:23:46 +00:00
#include "script_component.hpp"
PARAMS_1(_target);
private ["_allGear"];
2015-02-27 21:23:46 +00:00
_allGear = [[],[]];
{
(_allGear select 0) append (_x select 0);
(_allGear select 1) append (_x select 1);
2015-02-27 21:23:46 +00:00
} forEach [(getWeaponCargo _target), (getItemCargo _target), (getMagazineCargo _target), (getBackpackCargo _target)];
2015-02-27 22:16:35 +00:00
_allGear