diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index c3778862e6..b72660ce72 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -19,3 +19,14 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_Settings { + class GVAR(DisplayTextOnJam) { + typeName = "BOOL"; + isClientSetable = 1; + value = 1; + displayName = "$STR_ACE_overheating_SettingDisplayTextName"; + description = "$STR_ACE_overheating_SettingDisplayTextDesc"; + }; +}; + diff --git a/addons/overheating/functions/fnc_clearJam.sqf b/addons/overheating/functions/fnc_clearJam.sqf index 76941d75ac..4bba92eb3f 100644 --- a/addons/overheating/functions/fnc_clearJam.sqf +++ b/addons/overheating/functions/fnc_clearJam.sqf @@ -42,13 +42,16 @@ if (_weapon in _jammedWeapons) then { }; _unit playActionNow _clearJamAction; - }; - if (_weapon == primaryWeapon _unit) then { - playSound QGVAR(fixing_rifle); - } else { - if (_weapon == secondaryWeapon _unit) then { - playSound QGVAR(fixing_pistol); + if (_weapon == primaryWeapon _unit) then { + playSound QGVAR(fixing_rifle); + } else { + if (_weapon == secondaryWeapon _unit) then { + playSound QGVAR(fixing_pistol); + }; }; }; - [localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured); + + if (GVAR(DisplayTextOnJam)) then { + [localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured); + }; }; diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index f11b72688c..7810fb0ce2 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -61,7 +61,7 @@ if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then { _statement = { playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0]; - if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0}) then { + if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0} && {GVAR(DisplayTextOnJam)}) then { [localize "STR_ACE_Overheating_WeaponJammed"] call EFUNC(common,displayTextStructured); GVAR(knowAboutJam) = true; }; diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index f8cea2ddb9..bea2c61ca2 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -2,6 +2,12 @@ + + Display text on jam + + + Display a notification whenever your weapon gets jammed + Spare barrel Ersatzlauf