diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index f6db9fe467..dc025af65b 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -3,14 +3,14 @@ class ACE_unlockVehicle { \ displayName = CSTRING(Action_UnLock); \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \ - statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \ + statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \ priority = 0.3; \ icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ class ACE_lockVehicle { \ displayName = CSTRING(Action_Lock); \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \ - statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \ + statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \ priority = 0.2; \ icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ @@ -27,7 +27,7 @@ displayName = CSTRING(Action_UnLock); \ distance = 4; \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \ - statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \ + statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \ priority = 0.3; \ icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ @@ -35,7 +35,7 @@ displayName = CSTRING(Action_Lock); \ distance = 4; \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \ - statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \ + statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \ priority = 0.2; \ icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf index 0a9d00ffbc..3888a6e87a 100644 --- a/addons/vehiclelock/XEH_postInit.sqf +++ b/addons/vehiclelock/XEH_postInit.sqf @@ -1,8 +1,8 @@ #include "script_component.hpp" //Add Event Handlers -["ace_vehicleLock_SetupCustomKey", {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler; -["ace_vehicleLock_SetVehicleLock", {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler; +[QGVAR(setupCustomKey), {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler; +[QGVAR(setVehicleLock), {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler; if (!hasInterface) exitwith {}; diff --git a/addons/vehiclelock/config.cpp b/addons/vehiclelock/config.cpp index 8dbc7a5ece..8b51cb60a9 100644 --- a/addons/vehiclelock/config.cpp +++ b/addons/vehiclelock/config.cpp @@ -20,6 +20,6 @@ class CfgPatches { class ACE_newEvents { SettingsInitialized = "ace_settingsInitialized"; - VehicleLock_SetVehicleLock = "ace_vehicleLock_SetVehicleLock"; - VehicleLock_SetupCustomKey = "ace_vehicleLock_SetupCustomKey"; + VehicleLock_SetVehicleLock = QGVAR(setVehicleLock); + VehicleLock_SetupCustomKey = QGVAR(setupCustomKey); }; diff --git a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf index ea8a22d352..b45bf150f3 100644 --- a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf @@ -36,7 +36,7 @@ if (_useCustom) then { _keyMagazine = _newMags select 0; TRACE_2("setting up key on server",_veh,_keyMagazine); //Have the server run add the key to the vehicle's key array: - ["ace_vehicleLock_SetupCustomKey", [_veh, _keyMagazine]] call CBA_fnc_serverEvent; + [QGVAR(setupCustomKey), [_veh, _keyMagazine]] call CBA_fnc_serverEvent; } else { _keyName = [_veh] call FUNC(getVehicleSideKey); _unit addItem _keyName; //addItem has global effects diff --git a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf index ac16e0467f..c5e22d6336 100644 --- a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf +++ b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf @@ -38,7 +38,7 @@ TRACE_1("params",_vehicle); }; if ((_lock && {(locked _vehicle) != 2}) || {!_lock && {(locked _vehicle) != 0}}) then { TRACE_3("Setting Lock State",_lock,(typeOf _vehicle),_vehicle); - ["ace_vehicleLock_SetVehicleLock", [_vehicle, _lock], [_vehicle]] call CBA_fnc_targetEvent; + [QGVAR(SetVehicleLock), [_vehicle, _lock], [_vehicle]] call CBA_fnc_targetEvent; }; }; //Delay call until mission start (so everyone has the eventHandler's installed) diff --git a/addons/vehiclelock/functions/fnc_lockpick.sqf b/addons/vehiclelock/functions/fnc_lockpick.sqf index 9743eb5275..bf15a6eadd 100644 --- a/addons/vehiclelock/functions/fnc_lockpick.sqf +++ b/addons/vehiclelock/functions/fnc_lockpick.sqf @@ -55,7 +55,7 @@ switch (_funcType) do { [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition] call EFUNC(common,progressBar); }; case "finishLockpick": { - ["ace_vehicleLock_SetVehicleLock", [_veh, false], [_veh]] call CBA_fnc_targetEvent; + [QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent; }; default { ERROR("bad function type"); diff --git a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf index d2290ef732..9382de408e 100644 --- a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf +++ b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf @@ -1,6 +1,6 @@ /* * Author: PabstMirror - * Sets a vehicle lock state because of a "VehicleLock_SetVehicleLock" event + * Sets a vehicle lock state because of a "ace_vehiclelock_setVehicleLock" event * * Arguments: * 0: Vehicle