Add weight to items at traders

If the weight system is active all weights of the items will be displayed on the trader infos.

Also update the trading files and replace switch with call and exitwith which is faster.
This commit is contained in:
AirwavesMan
2020-09-12 03:10:31 +02:00
parent 9ad86a84a3
commit e5af93b50b
16 changed files with 141 additions and 115 deletions

View File

@@ -4,24 +4,22 @@ private ['_item', '_type'];
_item = _this select 0;
_type = _item select 1;
switch (true) do {
case (_type == "trade_items") :
call {
if (_type == "trade_items") exitwith
{
[_item] call Z_displayItemInfo;
};
case (_type == "trade_weapons") :
if (_type == "trade_weapons") exitwith
{
[_item] call Z_displayWeaponInfo;
};
case (_type == "trade_backpacks") :
if (_type == "trade_backpacks") exitwith
{
[_item] call Z_displayBackpackInfo;
};
case (_type in DZE_tradeVehicle) :
if (_type in DZE_tradeVehicle) exitwith
{
[_item] call Z_displayVehicleInfo;
};
default {
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText (parseText format["<t color='#ffffff'>%1</t>",localize "STR_EPOCH_TRADE_NO_INFO"]);
}
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText (parseText format["<t color='#ffffff'>%1</t>",localize "STR_EPOCH_TRADE_NO_INFO"]);
};