ACE3/addons/sitting/XEH_clientInit.sqf

18 lines
799 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
// Exit on Headless
if (!hasInterface) exitWith {};
2016-05-24 13:13:11 +00:00
["ace_settingsInitialized", {
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:
if (!GVAR(enable)) exitWith {};
// 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;
}] call CBA_fnc_addEventHandler;