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
|
|
|
|
2015-12-30 18:23:35 +00:00
|
|
|
["SettingsInitialized", {
|
|
|
|
TRACE_1("SettingInit", GVAR(enable));
|
|
|
|
|
|
|
|
//If not enabled, dont't add CanInteractWith Condition or event handlers:
|
|
|
|
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
|
|
|
|
["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
|
|
|
["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
|
|
|
}] call EFUNC(common,addEventHandler);
|