mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-25 01:20:49 +03:00
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:
@@ -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"]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user