mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Add handling for a missing description on backpacks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user