mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Clientside display text option for weapon jamming
This commit is contained in:
parent
d919c2436d
commit
2250255d65
@ -19,3 +19,14 @@ class CfgPatches {
|
|||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
|
|
||||||
#include "CfgWeapons.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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ if (_weapon in _jammedWeapons) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_unit playActionNow _clearJamAction;
|
_unit playActionNow _clearJamAction;
|
||||||
};
|
|
||||||
if (_weapon == primaryWeapon _unit) then {
|
if (_weapon == primaryWeapon _unit) then {
|
||||||
playSound QGVAR(fixing_rifle);
|
playSound QGVAR(fixing_rifle);
|
||||||
} else {
|
} else {
|
||||||
@ -50,5 +49,9 @@ if (_weapon in _jammedWeapons) then {
|
|||||||
playSound QGVAR(fixing_pistol);
|
playSound QGVAR(fixing_pistol);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (GVAR(DisplayTextOnJam)) then {
|
||||||
[localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured);
|
[localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -61,7 +61,7 @@ if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
|
|||||||
_statement = {
|
_statement = {
|
||||||
playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0];
|
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);
|
[localize "STR_ACE_Overheating_WeaponJammed"] call EFUNC(common,displayTextStructured);
|
||||||
GVAR(knowAboutJam) = true;
|
GVAR(knowAboutJam) = true;
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
<!-- Edited with tabler - 2014-12-17 -->
|
<!-- Edited with tabler - 2014-12-17 -->
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Overheating">
|
<Package name="Overheating">
|
||||||
|
<Key ID="STR_ACE_overheating_SettingDisplayTextName">
|
||||||
|
<English>Display text on jam</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_overheating_SettingDisplayTextDesc">
|
||||||
|
<English>Display a notification whenever your weapon gets jammed</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Overheating_SpareBarrelName">
|
<Key ID="STR_ACE_Overheating_SpareBarrelName">
|
||||||
<English>Spare barrel</English>
|
<English>Spare barrel</English>
|
||||||
<German>Ersatzlauf</German>
|
<German>Ersatzlauf</German>
|
||||||
|
Loading…
Reference in New Issue
Block a user