mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #181 from KoffeinFlummi/Additional_UI_Client_settings
Additional ui client settings #177
This commit is contained in:
commit
45dbb0524c
@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-12-17 -->
|
||||
<Project name="ACE">
|
||||
<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">
|
||||
<English>Spare barrel</English>
|
||||
<German>Ersatzlauf</German>
|
||||
|
@ -14,7 +14,7 @@ class Extended_PostInit_EventHandlers {
|
||||
class Extended_Take_EventHandlers {
|
||||
class CAManBase {
|
||||
class ACE_AmmoIndicatorReload {
|
||||
clientTake = QUOTE(if (_this select 0 == ACE_player && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_2(_this select 0, vehicle (_this select 0))] call FUNC(displayAmmo)};);
|
||||
clientTake = QUOTE(if (_this select 0 == ACE_player && {GVAR(DisplayText)} && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_2(_this select 0, vehicle (_this select 0))] call FUNC(displayAmmo)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,3 +21,14 @@ class CfgPatches {
|
||||
#include "CfgActions.hpp"
|
||||
|
||||
#include "RscInGameUI.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayText) {
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
value = 1;
|
||||
displayName = "$STR_ACE_reload_SettingDisplayTextName";
|
||||
description = "$STR_ACE_reload_SettingDisplayTextDesc";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-09-09 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Reload">
|
||||
<Key ID="STR_ACE_reload_SettingDisplayTextName">
|
||||
<English>Check ammo on weapon reload</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_reload_SettingDisplayTextDesc">
|
||||
<English>Check the ammo in your new magazine on magazine reload.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Reload_checkAmmo">
|
||||
<English>Check Ammo</English>
|
||||
<German>Munition prüfen</German>
|
||||
|
@ -13,3 +13,13 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayText) {
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
value = 1;
|
||||
displayName = "$STR_ACE_Weaponselect_SettingDisplayTextName";
|
||||
description = "$STR_ACE_Weaponselect_SettingDisplayTextDesc";
|
||||
};
|
||||
};
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
private ["_magazine", "_numberofMagazines"];
|
||||
|
||||
if !(GVAR(DisplayText)) exitwith {};
|
||||
|
||||
_magazine = _this select 0;
|
||||
_numberofMagazines = _this select 1;
|
||||
|
||||
|
@ -36,9 +36,10 @@ if (_nextMuzzle != "") then {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
||||
|
@ -35,10 +35,10 @@ if (_nextMuzzle != "") then {
|
||||
} else {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||
|
@ -35,10 +35,10 @@ if (_nextMuzzle != "") then {
|
||||
} else {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-12-20 -->
|
||||
<Project name="ACE">
|
||||
<Package name="WeaponSelect">
|
||||
<Key ID="STR_ACE_Weaponselect_SettingDisplayTextName">
|
||||
<English>Display text on grenade throw</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Weaponselect_SettingDisplayTextDesc">
|
||||
<English>Display a hint or text on grenade throw.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_WeaponSelect_SelectPistol">
|
||||
<English>Select Pistol</English>
|
||||
<German>Pistole auswählen</German>
|
||||
|
Loading…
Reference in New Issue
Block a user