2015-06-08 21:39:14 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-06-22 13:25:10 +00:00
|
|
|
// Exit on Headless
|
2015-09-11 14:58:26 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
2015-06-22 13:25:10 +00:00
|
|
|
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_settingsInitialized", {
|
2016-05-15 18:13:10 +00:00
|
|
|
if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.8.0"] call EFUNC(common,deprecateComponent)) exitwith {};
|
2015-12-30 20:55:25 +00:00
|
|
|
//If not enabled, then do not add CanInteractWith Condition or event handlers:
|
2015-12-30 18:23:35 +00:00
|
|
|
if (!GVAR(enable)) exitWith {};
|
2015-06-09 16:52:12 +00:00
|
|
|
|
2015-12-30 18:23:35 +00:00
|
|
|
// Add interaction menu exception
|
|
|
|
["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition);
|
|
|
|
|
|
|
|
// Handle interruptions
|
2016-06-03 18:57:21 +00:00
|
|
|
["ace_unconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
|
2016-05-25 18:23:53 +00:00
|
|
|
[QEGVAR(captives,setHandcuffed), {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
|
2016-05-22 15:29:05 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|