Add handling for a missing description on backpacks

This commit is contained in:
AirwavesMan
2020-07-23 01:25:10 +02:00
parent c6add8e2de
commit ca8bb7709d
2 changed files with 16 additions and 1 deletions

View File

@@ -19813,6 +19813,13 @@
<Dutch>Grote Wapenzak &lt;br/&gt;Inhoud: 70 liter</Dutch>
<French>Grand Fourreau &lt;br/&gt;Taille: 70</French>
</Key>
<Key ID="STR_BACKPACK_NO_DESC">
<English>%1 &lt;br/&gt;Capacity: %2 items</English>
<German>%1 &lt;br/&gt;Volumen: %2 Liter</German>
<Russian>%1 %2 слотов</Russian>
<Dutch>%1 &lt;br/&gt;Inhoud: %2 liter</Dutch>
<French>%1 &lt;br/&gt;Taille: %2</French>
</Key>
<Key ID="STR_EPOCH_ACTIONS_HALO">
<English>HALO Jump</English>

View File

@@ -207,7 +207,15 @@ HG_itemDescription = {
if (_inputItem call HG_isBackpack) then {
_name = getText(configfile >> "cfgVehicles" >> _inputItem >> "descriptionShort");
_return = ( _name);
if (_name == "") then {
private ["_displayname","_capacity"];
_displayname = getText(configfile >> "cfgVehicles" >> _inputItem >> "displayname");
_capacity = getNumber(configfile >> "cfgVehicles" >> _inputItem >> "transportMaxMagazines");
_name = [_displayname,format[localize "STR_BACKPACK_NO_DESC",_displayname,_capacity]] select (_capacity > 0);
};
_return = (_name);
};
_return