diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 90995b8659..99242d3726 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -44,7 +44,7 @@ // TOOO maybe drag/carry the unloaded item? }] call CBA_fnc_addEventHandler; -["ServerUnloadCargo", { +[QGVAR("serverUnload"), { params ["_item", "_emptyPosAGL"]; _item hideObjectGlobal false; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 73efef25ba..4d8a622e36 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -23,7 +23,7 @@ class ACE_newEvents { displayTextStructured = "ace_displayTextStructured"; cargoLoaded = "ace_cargoLoaded"; AddCargoByClass = "ace_addCargoByClass"; - ServerUnloadCargo = "ace_serverUnloadCargo"; + ServerUnloadCargo = QGVAR(serverUnload); UnloadCargo = "ace_unloadCargo"; hideObjectGlobal = "ace_hideObjectGlobal"; cargoAddedByClass = "ace_cargoAddedByClass"; diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 5faad01120..204a8479ca 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -52,7 +52,7 @@ if (_item isEqualType objNull) then { detach _item; // hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly // do both on server to ensure they are executed in the correct order - ["ace_serverUnloadCargo", [_item, _emptyPosAGL]] call CBA_fnc_serverEvent; + [QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent; } else { private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""]; _newItem setPosASL (AGLtoASL _emptyPosAGL); diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index c6136d0107..5828e4b18f 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -1,111 +1,111 @@ class RscInGameUI { class RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscUnitInfoNoHUD { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscUnitInfoSoldier: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;); }; class RscUnitInfoTank: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;); }; class RscUnitInfoAirNoWeapon: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); }; class RscUnitInfoAir: RscUnitInfoAirNoWeapon { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); }; class RscUnitInfo_AH64D_gunner { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;); }; class RscUnitInfoUAV { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;); }; class RscUnitInfoSubmarine: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;); }; class RscUnitInfoShip: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;); }; class RscWeaponEmpty { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinder { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeArtillery { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeArtilleryAuto { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinderPAS13 { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_LaserDesignator { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinderMAAWS { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinderAbramsCom { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinderAbramsGun { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscWeaponRangeFinderStrykerMGSGun { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_strider_commander { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_titan { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_punisher { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_SDV_periscope { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscUnitInfoParachute: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;); }; class RscUnitVehicle { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscOptics_LaserDesignator_02 { - onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); }; class RscStaminaBar { diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp index 864dcecda3..7d32512827 100644 --- a/addons/mk6mortar/RscInGameUI.hpp +++ b/addons/mk6mortar/RscInGameUI.hpp @@ -3,7 +3,7 @@ class RscInGameUI { class CA_IGUI_elements_group: RscControlsGroup {}; }; class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call CBA_fnc_localEvent;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call CBA_fnc_localEvent;); controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"}; class ACE_ChargeDisplay: RscStructuredText { idc = 80085; diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index 7b3dfe71d3..d469843d22 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -29,7 +29,7 @@ GVAR(showNamesTime) = -10; }] call CBA_fnc_addEventHandler; // Change settings accordingly when they are changed -["SettingChanged", { +["ace_settingChanged", { params ["_name"]; if (_name == QGVAR(showPlayerNames)) then { call FUNC(updateSettings); diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 3904b7f552..1e6484c7fa 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -28,7 +28,7 @@ if (isServer) then { if (!hasInterface) exitWith {}; -["playerChanged", { +["ace_playerChanged", { //When player changes, make sure to reset old unit's variable params ["", "_oldUnit"]; if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then { diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index b015b842a4..f2a826fa3b 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -40,7 +40,7 @@ if (_maxMagazines == 1) then { if (GVAR(level) == 1) then { // Fill magazine completely _target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; - ["displayTextStructured", + ["ace_displayTextStructured", [ [LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), @@ -50,7 +50,7 @@ if (_maxMagazines == 1) then { } else { // Fill only at most _numRounds _target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath]; - ["displayTextStructured", + ["ace_displayTextStructured", [ [LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), @@ -77,7 +77,7 @@ if (_maxMagazines == 1) then { } else { _target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath]; }; - ["displayTextStructured", + ["ace_displayTextStructured", [ [LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), @@ -91,7 +91,7 @@ if (_maxMagazines == 1) then { _target addMagazineTurret [_magazineClass, _turretPath]; _target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath]; }; - ["displayTextStructured", + ["ace_displayTextStructured", [ [LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf index d5ce159f38..5ce2096118 100644 --- a/addons/reload/XEH_postInit.sqf +++ b/addons/reload/XEH_postInit.sqf @@ -18,16 +18,16 @@ if (!hasInterface) exitWith {}; {false}, [19, [false, true, false]], false] call CBA_fnc_addKeybind; -["ace_setAmmoSync", { +[QGVAR(syncAmmo), { //To propagate the setAmmo change, do it on all clients params ["_unit", "_weapon", "_ammo"]; - TRACE_3("setAmmoSync EH",_unit,_weapon,_ammo); + TRACE_3("syncAmmo EH",_unit,_weapon,_ammo); _unit setAmmo [_weapon, _ammo]; }] call CBA_fnc_addEventHandler; // Listen for attempts to link ammo -["linkedAmmo", { +["ace_linkedAmmo", { params ["_receiver", "_giver", "_magazine"]; private _magazineType = currentMagazine _receiver; @@ -48,7 +48,7 @@ if (!hasInterface) exitWith {}; // Add the ammo private _ammoAdded = _ammoMissing min (_magazine select 1); - ["ace_setAmmoSync", [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call CBA_fnc_globalEvent; + [QGVAR(syncAmmo), [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call CBA_fnc_globalEvent; if ((_magazine select 1) - _ammoAdded > 0) then { ["ace_returnedAmmo", [_giver, _receiver, [_magazineType, (_magazine select 1) - _ammoAdded]], [_giver]] call CBA_fnc_targetEvent; @@ -56,7 +56,7 @@ if (!hasInterface) exitWith {}; }] call CBA_fnc_addEventHandler; // Listen for returned magazines -["returnedAmmo", { +["ace_returnedAmmo", { params ["_receiver", "", "_magazine"]; TRACE_2("returnedAmmo EH",_receiver,_magazine); diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index e82dab39c8..8d773efa4b 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -23,7 +23,7 @@ class CfgPatches { #include "ACE_Settings.hpp" class ACE_newEvents { - setAmmoSync = "ace_setAmmoSync"; + setAmmoSync = QGVAR(syncAmmo); returnedAmmo = "ace_returnedAmmo"; linkedAmmo = "ace_linkedAmmo"; }; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 660eea866a..2f0bbe7869 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" -["ace_setVehicleDamage", {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; -["ace_setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; +[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; +[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; // wheels -["ace_setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; +[QGVAR(setWheelHitPointDamage), {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index 84d8a6fa83..05bf5cbd3e 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -20,9 +20,9 @@ class CfgPatches { #include "CfgEden.hpp" class ACE_newEvents { - setWheelHitPointDamage = "ace_setWheelHitPointDamage"; - setVehicleHitPointDamage = "ace_setVehicleHitPointDamage"; - setVehicleDamage = "ace_setVehicleDamage"; + setWheelHitPointDamage = QGVAR(setWheelHitPointDamage); + setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage); + setVehicleDamage = QGVAR(setVehicleDamage); fixPosition = "ace_fixPosition"; displayTextStructured = "ace_displayTextStructured"; engineOn = "ace_engineOn"; diff --git a/addons/repair/functions/fnc_doRemoveTrack.sqf b/addons/repair/functions/fnc_doRemoveTrack.sqf index 00adf18cc1..8c3554adc1 100644 --- a/addons/repair/functions/fnc_doRemoveTrack.sqf +++ b/addons/repair/functions/fnc_doRemoveTrack.sqf @@ -34,7 +34,7 @@ private _newTrack = ["ACE_Track", getPosASL _unit, _hitPointDamage] call FUNC(sp TRACE_2("new track created",_newTrack,damage _newTrack); // raise event to set the new hitpoint damage -["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent; +[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent; // display text message if enabled if (GVAR(DisplayTextOnRepair)) then { diff --git a/addons/repair/functions/fnc_doRemoveWheel.sqf b/addons/repair/functions/fnc_doRemoveWheel.sqf index bf734af1ff..1d2fedeb77 100644 --- a/addons/repair/functions/fnc_doRemoveWheel.sqf +++ b/addons/repair/functions/fnc_doRemoveWheel.sqf @@ -34,7 +34,7 @@ private _newWheel = ["ACE_Wheel", getPosASL _unit, _hitPointDamage] call FUNC(sp TRACE_2("new wheel created",_newWheel,damage _newWheel); // raise event to set the new hitpoint damage -["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent; +[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent; // display text message if enabled if (GVAR(DisplayTextOnRepair)) then { diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index 8c8b8182f9..ede096a1fb 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -34,7 +34,7 @@ private _hitPointNewDamage = (_hitPointCurDamage - 0.5) max _postRepairDamageMin if (_hitPointNewDamage < _hitPointCurDamage) then { // raise event to set the new hitpoint damage TRACE_3("repairing main point", _vehicle, _hitPointIndex, _hitPointNewDamage); - ["ace_setVehicleHitPointDamage", [_vehicle, _hitPointIndex, _hitPointNewDamage], _vehicle] call CBA_fnc_targetEvent; + [QGVAR(setVehicleHitPointDamage), [_vehicle, _hitPointIndex, _hitPointNewDamage], _vehicle] call CBA_fnc_targetEvent; _hitPointCurDamage = _hitPointNewDamage; }; @@ -55,7 +55,7 @@ if (isArray _hitpointGroupConfig) then { private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin; if (_subPointNewDamage < _subPointCurDamage) then { TRACE_3("repairing sub point", _vehicle, _subHitIndex, _subPointNewDamage); - ["ace_setVehicleHitPointDamage", [_vehicle, _subHitIndex, _subPointNewDamage], _vehicle] call CBA_fnc_targetEvent; + [QGVAR(setVehicleHitPointDamage), [_vehicle, _subHitIndex, _subPointNewDamage], _vehicle] call CBA_fnc_targetEvent; }; }; } forEach _subHitArray; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index 897ef881c1..34f29506a3 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -41,7 +41,7 @@ _hitPointDamage = (_hitPointDamage - _damageRepaired) min 0; deleteVehicle _track; // raise event to set the new hitpoint damage -["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _hitPointDamage], _vehicle] call CBA_fnc_targetEvent; +[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _hitPointDamage], _vehicle] call CBA_fnc_targetEvent; // display text message if enabled if (GVAR(DisplayTextOnRepair)) then { diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index 1de9c3b7bf..b0b71e5b61 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {}; deleteVehicle _track; // raise event to set the new hitpoint damage -["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent; +[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent; // display text message if enabled if (GVAR(DisplayTextOnRepair)) then { diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index 3d6b161cfa..24b995a45f 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {}; deleteVehicle _wheel; // raise event to set the new hitpoint damage -["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent; +[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent; // display text message if enabled if (GVAR(DisplayTextOnRepair)) then { diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index ba04cdb7eb..0f809b345c 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -1,7 +1,7 @@ /* * Author: commy2 * Set the hitpoint damage and change the structural damage acordingly, requires local vehicle. - * Handles the "setVehicleHitPointDamage" event + * Handles the "ace_repair_setVehicleHitPointDamage" event * * Arguments: * 0: Local Vehicle to Damage diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf index 47b7c8c139..117fd414a0 100644 --- a/addons/ui/XEH_clientInit.sqf +++ b/addons/ui/XEH_clientInit.sqf @@ -8,7 +8,7 @@ if (!hasInterface) exitWith {}; [true] call FUNC(setElements); // On load and entering/exiting a vehicle - ["infoDisplayChanged", { + ["ace_infoDisplayChanged", { // Selective UI Advanced // Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified private _force = [true, false] select (GVAR(allowSelectiveUI)); @@ -18,7 +18,7 @@ if (!hasInterface) exitWith {}; }] call CBA_fnc_addEventHandler; // On changing settings - ["SettingChanged", { + ["ace_settingChanged", { params ["_name"]; // Selective UI Basic