mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +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:
@@ -1,4 +1,4 @@
|
||||
private ["_item","_picture","_class","_display","_buyPrice","_sellPrice","_magazines","_magText","_formattedText","_buyCurrency","_sellCurrency","_attachments","_attachText","_config","_text","_attach","_type"];
|
||||
private ["_parentClasses","_picBuy","_picSell","_item","_picture","_class","_display","_buyPrice","_sellPrice","_magazines","_magText","_formattedText","_buyCurrency","_sellCurrency","_attachments","_attachText","_config","_text","_attach","_type"];
|
||||
#include "defines.hpp"
|
||||
|
||||
_item = _this select 0;
|
||||
@@ -124,4 +124,14 @@ if !("ItemCore" in _parentClasses or "Binocular" in _parentClasses) then {
|
||||
];
|
||||
};
|
||||
|
||||
if (DZE_R3F_WEIGHT) then {
|
||||
private "_weight";
|
||||
|
||||
_weight = getNumber(configFile >> "CfgWeight" >> "Weapons" >> _class >> "weight");
|
||||
_formattedText = _formattedText + format [
|
||||
"<t color='#bcbcbc' size='0.7'>%1: </t><t color='#ffffff' size='0.7'>%2 %3</t>"
|
||||
,localize "STR_EPOCH_WEIGHT",_weight,localize "STR_R3F_WEIGHT_English"
|
||||
];
|
||||
};
|
||||
|
||||
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;
|
||||
|
||||
Reference in New Issue
Block a user