mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Clientside display text option for weapon grenades
This commit is contained in:
parent
39be8ffbe7
commit
358a95381b
@ -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 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>
|
||||
|
Loading…
Reference in New Issue
Block a user