mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
CBA Events
This commit is contained in:
parent
00e5cef145
commit
ddf9e0b5cc
addons/minedetector
@ -1,7 +1,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
|
||||||
["minedetector_enabled", {
|
[QGVAR(detectorEnabled), {
|
||||||
params ["_unit", "_type"];
|
params ["_unit", "_type"];
|
||||||
private _config = [_type] call FUNC(getDetectorConfig);
|
private _config = [_type] call FUNC(getDetectorConfig);
|
||||||
|
|
||||||
@ -9,15 +9,15 @@
|
|||||||
_unit setvariable [QGVAR(helperLogic), _helperObject];
|
_unit setvariable [QGVAR(helperLogic), _helperObject];
|
||||||
|
|
||||||
[FUNC(detectorLoop), 0.01, [_unit, _type, _config, ACE_time, _helperObject]] call CBA_fnc_addPerFrameHandler;
|
[FUNC(detectorLoop), 0.01, [_unit, _type, _config, ACE_time, _helperObject]] call CBA_fnc_addPerFrameHandler;
|
||||||
}] call EFUNC(common,addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["minedetector_disabled", {
|
[QGVAR(detectorDisabled), {
|
||||||
params ["_unit", "_type"];
|
params ["_unit", "_type"];
|
||||||
private _helperObject = _unit getvariable [QGVAR(helperLogic), objNull];
|
private _helperObject = _unit getvariable [QGVAR(helperLogic), objNull];
|
||||||
if !(isNull _helperObject) then {
|
if !(isNull _helperObject) then {
|
||||||
deleteVehicle _helperObject;
|
deleteVehicle _helperObject;
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,4 +21,4 @@ params ["_unit", "_detectorType"];
|
|||||||
|
|
||||||
_unit setvariable [format[QGVAR(enable_%1), _detectorType], false];
|
_unit setvariable [format[QGVAR(enable_%1), _detectorType], false];
|
||||||
|
|
||||||
["minedetector_disabled", [_unit, _detectorType]] call EFUNC(common,localEvent);
|
[QGVAR(detectorDisabled), [_unit, _detectorType]] call CBA_fnc_localEvent;
|
||||||
|
@ -21,4 +21,4 @@ params ["_unit", "_detectorType"];
|
|||||||
|
|
||||||
_unit setvariable [format[QGVAR(enable_%1), _detectorType], true];
|
_unit setvariable [format[QGVAR(enable_%1), _detectorType], true];
|
||||||
|
|
||||||
["minedetector_enabled", [_unit, _detectorType]] call EFUNC(common,localEvent);
|
[QGVAR(detectorEnabled), [_unit, _detectorType]] call CBA_fnc_localEvent;
|
||||||
|
Loading…
Reference in New Issue
Block a user