#include "..\script_component.hpp" /* * Author: PabstMirror, Whigital * Check if there is a handler blocking detonation * * Arguments: * 0: Unit * 1: Max range (-1 to ignore) * 2: Explosive * 3: Fuse time * 4: Trigger Item Classname * * Return Value: * Detonation Allowed * * Example: * [player, -1, Explosive, 1, "ACE_Cellphone"] call ACE_Explosives_fnc_checkDetonateHandlers; * * Public: No */ params ["_unit", "_range", "_explosive", "_fuseTime", ["_triggerClassname", "#unknown", [""]]]; TRACE_5("checkDetonateHandlers",_unit,_range,_explosive,_fuseTime,_triggerClassname); private _detonationAllowed = true; { // Pass [Unit, MaxRange , Explosive , FuzeTime , TriggerItem ] private _handlerResult = [_unit, _range, _explosive, _fuseTime, _triggerClassname] call _x; if (_handlerResult isEqualTo false) then { TRACE_1("Handler Blocking",_forEachIndex); _detonationAllowed = false; break; }; } forEach GVAR(detonationHandlers); _detonationAllowed