ACE3/addons/common/functions/fnc_getAllGear.sqf

69 lines
1.6 KiB
Plaintext
Raw Normal View History

2015-01-12 09:07:03 +00:00
/*
2015-04-03 15:50:52 +00:00
* Author: bux578, commy2
* Returns an array containing all items of a given unit
*
2015-09-20 21:18:51 +00:00
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* 0: Headgear <STRING>
* 1: Goggles <STRING>
* 2: Uniform <STRING>
* 3: Uniform Items <ARRAY>
* 4: Vest <String>
* 5: Vest Items <ARRAY>
* 6: Backback <STRING>
* 7: Backpack Items <ARRAY>
* 8: Rifle <STRING>
* 9: Rifle Items <ARRAY>
* 10: Rifle Magazines <ARRAY>
* 11: Launcher <STRING>
* 12: Launcher Items <ARRAY>
* 13: Launcher Magazines <ARRAY>
* 14: Handgun <STRING>
* 15: Handgun Items <ARRAY>
* 16: Handgun Magazines <ARRAY>
* 17: Assigned Items (map, compass, watch, etc.) <ARRAY>
* 18: Binoculars <STRING>
* 19: Binocular Magazine (E.g. Laserbatteries) <STRING>
*
2015-09-20 21:18:51 +00:00
* Public: Yes
2015-04-03 15:50:52 +00:00
*
2015-09-20 21:18:51 +00:00
* Note: Element 17 includes the Head Mounted Display (HMD)
*/
#include "script_component.hpp"
params ["_unit", ["_showDeprecated", true]];
if (_showDeprecated) then {
ACE_DEPRECATED("ace_common_fnc_getAllGear","3.7.0","getUnitLoadout");
};
2015-01-12 09:07:03 +00:00
2015-04-03 15:50:52 +00:00
if (isNull _unit) exitWith {[
"",
"",
"", [],
"", [],
"", [],
"", ["","","",""], [],
"", ["","","",""], [],
"", ["","","",""], [],
[],
"",
""
2015-04-03 15:50:52 +00:00
]};
2015-01-12 09:07:03 +00:00
[
2015-04-03 15:50:52 +00:00
headgear _unit,
goggles _unit,
uniform _unit, uniformItems _unit,
vest _unit, vestItems _unit,
backpack _unit, backpackItems _unit,
primaryWeapon _unit, primaryWeaponItems _unit, primaryWeaponMagazine _unit,
secondaryWeapon _unit, secondaryWeaponItems _unit, secondaryWeaponMagazine _unit,
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
assignedItems _unit,
binocular _unit,
[_unit] call FUNC(binocularMagazine)
2015-04-03 15:50:52 +00:00
]