2016-02-26 06:57:18 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-06-18 14:41:13 +00:00
|
|
|
["ace_settingsInitialized",{
|
|
|
|
// Only add an InitPost EH if setting is enabled (and apply retroactively)
|
2016-12-15 05:55:06 +00:00
|
|
|
if (isServer && {GVAR(autoAddObjects)}) then {
|
2016-06-18 14:41:13 +00:00
|
|
|
["AllVehicles", "InitPost", FUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler;
|
|
|
|
};
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
|
2016-05-16 13:55:19 +00:00
|
|
|
// Global skill module PVs values for persistence, just listen for the PV
|
|
|
|
QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill);
|
2016-05-18 20:19:52 +00:00
|
|
|
|
2017-05-26 15:07:33 +00:00
|
|
|
[QGVAR(moveToRespawnPosition), BIS_fnc_moveToRespawnPosition] call CBA_fnc_addEventHandler;
|
2016-06-11 20:02:16 +00:00
|
|
|
[QGVAR(moduleDefendArea), CBA_fnc_taskDefend] call CBA_fnc_addEventHandler;
|
|
|
|
[QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler;
|
|
|
|
[QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler;
|
|
|
|
[QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler;
|
2017-05-10 16:29:04 +00:00
|
|
|
[QGVAR(suppressiveFire), LINKFUNC(moduleSuppressiveFireLocal)] call CBA_fnc_addEventHandler;
|
2017-09-21 18:43:35 +00:00
|
|
|
[QGVAR(enableFlashlight), {
|
|
|
|
params ["_unit", "_mode"];
|
|
|
|
_unit enableGunLights _mode;
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
2016-11-15 12:07:48 +00:00
|
|
|
|
|
|
|
// Editable object commands must be ran on server, this events are used in the respective module
|
|
|
|
if (isServer) then {
|
2016-12-15 05:55:06 +00:00
|
|
|
[QGVAR(equipFries), EFUNC(fastroping,equipFRIES)] call CBA_fnc_addEventHandler;
|
2016-11-15 12:07:48 +00:00
|
|
|
[QGVAR(addObjects), {
|
2016-12-15 05:55:06 +00:00
|
|
|
params ["_objects", ["_curator", objNull]];
|
2016-11-15 12:07:48 +00:00
|
|
|
|
|
|
|
if !(isNull _curator) exitWith { _curator addCuratorEditableObjects [_objects, true]; };
|
|
|
|
|
|
|
|
{
|
|
|
|
_x addCuratorEditableObjects [_objects, true];
|
|
|
|
} forEach allCurators;
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
|
|
|
|
[QGVAR(removeObjects), {
|
2016-12-15 05:55:06 +00:00
|
|
|
params ["_objects", ["_curator", objNull]];
|
2016-11-15 12:07:48 +00:00
|
|
|
|
|
|
|
if !(isNull _curator) exitWith { _curator removeCuratorEditableObjects [_objects, true]; };
|
|
|
|
|
|
|
|
{
|
|
|
|
_x removeCuratorEditableObjects [_objects, true];
|
|
|
|
} forEach allCurators;
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
};
|