ACE3/addons/trenches/functions/fnc_hasEntrenchingTool.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

27 lines
523 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: veteran29
* Checks if unit has entrenching tool.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Has entrenching tool <BOOL>
*
* Example:
* [bob] call ace_trenches_fnc_hasEntrenchingTool
*
* Public: Yes
*/
params [
["_unit", objNull, [objNull]]
];
private _uniqueItems = _unit call EFUNC(common,uniqueItems);
_uniqueItems append weapons _unit;
_uniqueItems pushBack backpack _unit;
GVAR(entrenchingTools) findIf {_x in _uniqueItems} != -1 // return