mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
d372111d3f
- Add modern privates - Don't add actions, canInteractWith, or EH if not enabled
19 lines
704 B
Plaintext
19 lines
704 B
Plaintext
#include "script_component.hpp"
|
|
|
|
// Exit on Headless
|
|
if (!hasInterface) exitWith {};
|
|
|
|
["SettingsInitialized", {
|
|
TRACE_1("SettingInit", GVAR(enable));
|
|
|
|
//If not enabled, dont't 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
|
|
["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
|
["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
|
}] call EFUNC(common,addEventHandler);
|