Clientside display text option for weapon grenades

This commit is contained in:
Glowbal 2015-03-08 16:56:47 +01:00
parent 39be8ffbe7
commit 358a95381b
6 changed files with 30 additions and 11 deletions

View File

@ -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";
};
};

View File

@ -14,6 +14,8 @@
private ["_magazine", "_numberofMagazines"];
if !(GVAR(DisplayText)) exitwith {};
_magazine = _this select 0;
_numberofMagazines = _this select 1;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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 weapon select</English>
</Key>
<Key ID="STR_ACE_Weaponselect_SettingDisplayTextDesc">
<English>Display a hint or text on weapon select or grenade throw.</English>
</Key>
<Key ID="STR_ACE_WeaponSelect_SelectPistol">
<English>Select Pistol</English>
<German>Pistole auswählen</German>