mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8648ccaba5
* Optimize explosive actions * Optimize hasExplosives function * Readability parentheses * bump * testing... * last try * for science * fix for sqf_validator
25 lines
557 B
Plaintext
25 lines
557 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Garth 'L-H' de Wet, mharis001
|
|
* Checks if given unit has any placeable explosives on them.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Has explosives <BOOL>
|
|
*
|
|
* Example:
|
|
* [player] call ace_explosives_fnc_hasExplosives
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_unit"];
|
|
TRACE_1("params",_unit);
|
|
|
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
|
private _magazines = magazines _unit;
|
|
|
|
((_magazines arrayIntersect _magazines) findIf {getNumber (_cfgMagazines >> _x >> QGVAR(Placeable)) == 1}) > -1
|