Add deprecate sitting component

This commit is contained in:
Glowbal 2016-05-15 19:38:37 +02:00
parent 3d74c25c97
commit 7a7e930024
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ class CfgVehicles {
category = "ACE";
displayName = CSTRING(ModuleDisplayName);
function = QFUNC(moduleInit);
scope = 2;
scope = 1;
isGlobal = 1;
isSingular = 1;
icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa));

View File

@ -3,11 +3,12 @@
// Exit on Headless
if (!hasInterface) exitWith {};
GVAR(isEnabled) = false;
["SettingsInitialized", {
TRACE_1("SettingInit", GVAR(enable));
if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.7.0"] call EFUNC(common,deprecateComponent)) exitwith {};
//If not enabled, then do not add CanInteractWith Condition or event handlers:
if (!GVAR(enable)) exitWith {};
if (!GVAR(enable) || GVAR(isEnabled)) exitWith {};
GVAR(isEnabled) = true;
// Add interaction menu exception
["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition);