diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 4fcf4fc055..a6fe7c415f 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" if (!hasInterface) exitWith {}; -["ACE3", QGVAR(wipeGlasses), localize "STR_ACE_Goggles_WipeGlasses", +["ACE3 Common", QGVAR(wipeGlasses), localize "STR_ACE_Goggles_WipeGlasses", { if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith { call FUNC(clearGlasses); diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index d86ab4bd53..edb25d99bb 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -28,7 +28,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)]; }; -["ACE3", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"), +["ACE3 Common", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false}; @@ -37,7 +37,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)]; },{[0,false] call FUNC(keyUp)}, [219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key -["ACE3", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"), +["ACE3 Common", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 98b1cc1523..6417043df2 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -22,7 +22,7 @@ GVAR(isOpeningDoor) = false; // Add keybinds -["ACE3", QGVAR(openDoor), localize "STR_ACE_Interaction_OpenDoor", +["ACE3 Common", QGVAR(openDoor), localize "STR_ACE_Interaction_OpenDoor", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; @@ -42,7 +42,7 @@ GVAR(isOpeningDoor) = false; [57, [false, true, false]], false] call cba_fnc_addKeybind; //Key CTRL+Space -["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder", +["ACE3 Common", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; @@ -56,7 +56,7 @@ GVAR(isOpeningDoor) = false; {false}, [20, [true, false, false]], false] call cba_fnc_addKeybind; -["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey", +["ACE3 Common", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey", { // Conditions: canInteract //if !([ACE_player, objNull, ["isNotDragging"]] call EFUNC(common,canInteractWith)) exitWith {false}; // not needed diff --git a/addons/laserpointer/CfgWeapons.hpp b/addons/laserpointer/CfgWeapons.hpp index 4f6a61c83a..6223c3a988 100644 --- a/addons/laserpointer/CfgWeapons.hpp +++ b/addons/laserpointer/CfgWeapons.hpp @@ -20,6 +20,8 @@ class CfgWeapons { ACE_nextModeClass = "acc_pointer_IR"; ACE_modeDescription = "$STR_ACE_Laserpointer_Laser"; + ACE_laserpointer = 1; + author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_acc_pointer_red"; scope = 1; @@ -79,6 +81,8 @@ class CfgWeapons { ACE_nextModeClass = "ACE_acc_pointer_green_IR"; ACE_modeDescription = "$STR_ACE_Laserpointer_Laser"; + ACE_laserpointer = 2; + author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_acc_pointer_green"; scope = 2; diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index 0e4ddf981a..c1e955d028 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -25,10 +25,17 @@ _isIR = _isIR == 1; default {""}; }; - _laserID = ["ACE_acc_pointer_red", "ACE_acc_pointer_green"] find _laser; + if (_laser != "") then { + _cacheName = format [QGVAR(laser_%1), _laser]; + _laserID = missionNamespace getVariable [_cacheName, -1]; + if (missionNamespace getVariable [_cacheName, -1] == -1) then { + _laserID = getNumber (configFile >> "CfgWeapons" >> _laser >> "ACE_laserpointer"); + missionNamespace setVariable [_cacheName, _laserID]; + }; - if (_laserID > -1 && {_x isFlashlightOn _weapon}) then { - [_x, 50, _laserID == 1 || _isIR] call FUNC(drawLaserpoint); + if (_laserID > 0 && {_x isFlashlightOn _weapon}) then { + [_x, 50, _laserID == 2 || _isIR] call FUNC(drawLaserpoint); + }; }; } forEach GVAR(nearUnits); diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index 1df20e45e7..cea2025dcc 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -8,7 +8,7 @@ if (!hasInterface) exitWith {}; GVAR(ShowNamesTime) = -10; // Add keybinds -["ACE3", QGVAR(showNameTags), localize "STR_ACE_NameTags_ShowNames", +["ACE3 Common", QGVAR(showNameTags), localize "STR_ACE_NameTags_ShowNames", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 1427ff59b1..455c336d96 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -25,7 +25,7 @@ GVAR(rain_period_start_time) = time; }; }; -["ACE3", QGVAR(WindInfoKey), localize "STR_ACE_Weather_WindInfoKey", +["ACE3 Common", QGVAR(WindInfoKey), localize "STR_ACE_Weather_WindInfoKey", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/documentation/development/ace3-config-entries.md b/documentation/development/ace3-config-entries.md index 78f8022856..1033172469 100644 --- a/documentation/development/ace3-config-entries.md +++ b/documentation/development/ace3-config-entries.md @@ -54,6 +54,9 @@ ace_detonator ace_barrelTwist ace_twistDirection ace_barrelLength +ace_laserpointer +ace_nextmodeclass +ace_modedescription ```