Add better handling for unbuyable items, vehicles on trading

This commit is contained in:
AirwavesMan
2021-03-08 15:09:39 +01:00
parent 979751d302
commit 4fd12d0086
5 changed files with 42 additions and 19 deletions

View File

@@ -32,23 +32,23 @@ if (Z_SingleCurrency) then {
"<img image='%1' size='3' align='center'/><br />" + "<img image='%1' size='3' align='center'/><br />" +
"<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
"<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%3</t><br />" + "<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%3</t><br />" +
"<t color='#bcbcbc' size='0.7'>%12: </t><t color='#ffffff' size='0.7'>%6 %4</t><br />" + "<t color='#bcbcbc' size='0.7'>%12: </t><t color='#ffffff' size='0.7'>%6 %7</t><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%5 %4</t><br />" +
"<t color='#bcbcbc' size='0.7'>%14: </t><t color='#ffffff' size='0.7'><img image='%13'/> %8</t><br />", "<t color='#bcbcbc' size='0.7'>%14: </t><t color='#ffffff' size='0.7'><img image='%13'/> %8</t><br />",
_picture, _picture,
_display, _display,
_class, _class,
CurrencyName, CurrencyName,
if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";}, if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";},
if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";}, if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
CurrencyName, if (_buyPrice >= 0) then {CurrencyName} else {""},
_transportMaxMagazines, _transportMaxMagazines,
localize "STR_EPOCH_NAME", localize "STR_EPOCH_NAME",
localize "STR_EPOCH_CLASS", localize "STR_EPOCH_CLASS",
localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_292",
localize "STR_EPOCH_PLAYER_291", localize "STR_EPOCH_PLAYER_291",
"\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa", "\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa",
localize "STR_EPOCH_CARGO_SPACE" localize "STR_EPOCH_CARGO_SPACE"
]; ];
} else { } else {
_picSell = ""; _picSell = "";
@@ -60,6 +60,8 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then { if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture'); _picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName'); _buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
} else {
_buyCurrency = "";
}; };
_formattedText = format [ _formattedText = format [
@@ -74,7 +76,7 @@ if (Z_SingleCurrency) then {
_class, _class,
_buyCurrency, _buyCurrency,
if (_sellPrice >= 0) then {_sellPrice} else {"";}, if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";}, if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_sellCurrency, _sellCurrency,
_transportMaxMagazines, _transportMaxMagazines,
localize "STR_EPOCH_NAME", localize "STR_EPOCH_NAME",

View File

@@ -57,19 +57,20 @@ if (Z_SingleCurrency) then {
"<img image='%1' size='3' align='center'/><br />" + "<img image='%1' size='3' align='center'/><br />" +
"<t color='#bcbcbc' size='0.7'>%8: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%8: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
"<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%3</t><br />" + "<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%3</t><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%6 %7</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%6 %12</t><br />" +
"<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />", "<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />",
_picture, _picture,
_display, _display,
_class, _class,
'lazy', 'lazy',
if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";}, if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";},
if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";}, if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
CurrencyName, CurrencyName,
localize "STR_EPOCH_NAME", localize "STR_EPOCH_NAME",
localize "STR_EPOCH_CLASS", localize "STR_EPOCH_CLASS",
localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_292",
localize "STR_EPOCH_PLAYER_291" localize "STR_EPOCH_PLAYER_291",
if (_buyPrice >= 0) then {CurrencyName} else {""}
]; ];
} else { } else {
_picSell = ""; _picSell = "";
@@ -81,7 +82,10 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then { if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "picture"); _picBuy = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "picture");
_buyCurrency = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "displayName"); _buyCurrency = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "displayName");
} else {
_buyCurrency = "";
}; };
_formattedText = format [ _formattedText = format [
"<img image='%1' size='3' align='center'/><br />" + "<img image='%1' size='3' align='center'/><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
@@ -93,7 +97,7 @@ if (Z_SingleCurrency) then {
_class, _class,
'lazy', 'lazy',
if (_sellPrice >= 0) then {_sellPrice} else {"";}, if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";}, if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_sellCurrency, _sellCurrency,
_picSell, _picSell,
_buyCurrency, _buyCurrency,

View File

@@ -117,7 +117,7 @@ if (Z_SingleCurrency) then {
"<img image='%1' size='3' /><br />" + "<img image='%1' size='3' /><br />" +
"<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%3</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%3</t><br />" +
"<t color='#bcbcbc' size='0.7'>%13: </t><t color='#ffffff' size='0.7'>%6 %7</t><br />" + "<t color='#bcbcbc' size='0.7'>%13: </t><t color='#ffffff' size='0.7'>%6 %27</t><br />" +
"<t color='#bcbcbc' size='0.7'>%12: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />" + "<t color='#bcbcbc' size='0.7'>%12: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />" +
"<t color='#bcbcbc' size='0.7'>%14: </t><t color='#ffffff' size='0.7'><img image='%15'/> %8 <img image='%16'/> %9 <img image='%26'/> %4</t><br />" + "<t color='#bcbcbc' size='0.7'>%14: </t><t color='#ffffff' size='0.7'><img image='%15'/> %8 <img image='%16'/> %9 <img image='%26'/> %4</t><br />" +
"<t color='#bcbcbc' size='0.7'>%17: </t><t color='#ffffff' size='0.7'>%18 </t><t color='#bcbcbc' size='0.7'>%24: </t><t color='#ffffff' size='0.7'>%25</t><br />" + // Armor / Seats "<t color='#bcbcbc' size='0.7'>%17: </t><t color='#ffffff' size='0.7'>%18 </t><t color='#bcbcbc' size='0.7'>%24: </t><t color='#ffffff' size='0.7'>%25</t><br />" + // Armor / Seats
@@ -127,7 +127,7 @@ if (Z_SingleCurrency) then {
_class, _class,
_transportmaxBackpacks, _transportmaxBackpacks,
if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";}, if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";},
if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";}, if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
CurrencyName, CurrencyName,
_transportMaxWeapons, _transportMaxWeapons,
_transportMaxMagazines, _transportMaxMagazines,
@@ -147,7 +147,8 @@ if (Z_SingleCurrency) then {
_maxSpeed, _maxSpeed,
localize "STR_EPOCH_SEATS", localize "STR_EPOCH_SEATS",
_seats, _seats,
"\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa" "\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa",
if (_buyPrice >= 0) then {CurrencyName} else {""}
]; ];
} else { } else {
_picSell = ""; _picSell = "";
@@ -159,6 +160,8 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then { if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture'); _picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName'); _buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
} else {
_buyCurrency = "";
}; };
_formattedText = format [ _formattedText = format [
@@ -175,7 +178,7 @@ if (Z_SingleCurrency) then {
_class, _class,
_transportmaxBackpacks, _transportmaxBackpacks,
if (_sellPrice >= 0) then {_sellPrice} else {"";}, if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";}, if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_buyCurrency, _buyCurrency,
_transportMaxWeapons, _transportMaxWeapons,
_transportMaxMagazines, _transportMaxMagazines,

View File

@@ -66,19 +66,20 @@ if (Z_SingleCurrency) then {
"<img image='%1' size='3' align='center' /><br />" + "<img image='%1' size='3' align='center' /><br />" +
"<t color='#bcbcbc' size='0.7'>%8: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%8: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
"<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%3</t><br />" + "<t color='#bcbcbc' size='0.7'>%9: </t><t color='#ffffff' size='0.7'>%3</t><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%6 %7</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%6 %12</t><br />" +
"<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />", "<t color='#bcbcbc' size='0.7'>%10: </t><t color='#ffffff' size='0.7'>%5 %7</t><br />",
_picture, _picture,
_display, _display,
_class, _class,
_magText, _magText,
if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";}, if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";},
if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";}, if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
CurrencyName, CurrencyName,
localize "STR_EPOCH_NAME", localize "STR_EPOCH_NAME",
localize "STR_EPOCH_CLASS", localize "STR_EPOCH_CLASS",
localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_292",
localize "STR_EPOCH_PLAYER_291" localize "STR_EPOCH_PLAYER_291",
if (_buyPrice >= 0) then {CurrencyName} else {""}
]; ];
} else { } else {
_picSell = ""; _picSell = "";
@@ -90,7 +91,10 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then { if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture'); _picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName'); _buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
} else {
_buyCurrency = "";
}; };
_formattedText = format [ _formattedText = format [
"<img image='%1' size='3' align='center' /><br />" + "<img image='%1' size='3' align='center' /><br />" +
"<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%2</t><br />" + "<t color='#bcbcbc' size='0.7'>%11: </t><t color='#ffffff' size='0.7'>%2</t><br />" +
@@ -102,7 +106,7 @@ if (Z_SingleCurrency) then {
_class, _class,
_magText, _magText,
if (_sellPrice >= 0) then {_sellPrice} else {"";}, if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";}, if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_sellCurrency, _sellCurrency,
_buyCurrency, _buyCurrency,
_picSell, _picSell,

View File

@@ -13471,6 +13471,11 @@
<German>Motorrad M1030 (Grün)</German> <German>Motorrad M1030 (Grün)</German>
<Russian>Мотоцикл M1030 (Зелёный)</Russian> <Russian>Мотоцикл M1030 (Зелёный)</Russian>
</Key> </Key>
<Key ID="STR_VEH_NAME_SUBMARINE">
<English>Submarine</English>
<German>U-Boot</German>
<Russian>Подводная лодка</Russian>
</Key>
<Key ID="STR_VEH_NAME_RHIB_M2"> <Key ID="STR_VEH_NAME_RHIB_M2">
<English>RHIB (M2)</English> <English>RHIB (M2)</English>
<Russian>НЛЖК (M2)</Russian> <Russian>НЛЖК (M2)</Russian>
@@ -13478,7 +13483,7 @@
<Key ID="STR_VEH_NAME_RHIB_MK19"> <Key ID="STR_VEH_NAME_RHIB_MK19">
<English>RHIB (MK 19)</English> <English>RHIB (MK 19)</English>
<Russian>НЛЖК (MK 19)</Russian> <Russian>НЛЖК (MK 19)</Russian>
</Key> </Key>
<Key ID="STR_VEH_NAME_PBX"> <Key ID="STR_VEH_NAME_PBX">
<English>PBX Rubber Boat</English> <English>PBX Rubber Boat</English>
<Russian>Моторная лодка ПВХ</Russian> <Russian>Моторная лодка ПВХ</Russian>
@@ -28943,6 +28948,11 @@
<German>Etwas Wechselgeld ist in deinem Inventar verborgen. Reduziere die Gegenstände in deinem Inventar, um das Wechselgeld sichtbar zu machen!</German> <German>Etwas Wechselgeld ist in deinem Inventar verborgen. Reduziere die Gegenstände in deinem Inventar, um das Wechselgeld sichtbar zu machen!</German>
<Russian>Некоторые изменения скрыты в вашем инвентаре. Уменьшите количество предметов в инвентаре, чтобы увидеть изменения!</Russian> <Russian>Некоторые изменения скрыты в вашем инвентаре. Уменьшите количество предметов в инвентаре, чтобы увидеть изменения!</Russian>
</Key> </Key>
<Key ID="STR_EPOCH_TRADE_UNBUYABLE">
<English>Unbuyable</English>
<German>Nicht kaufbar</German>
<Russian>Невозможно купить</Russian>
</Key>
<!-- PLOT MANAGEMENT BELOW --> <!-- PLOT MANAGEMENT BELOW -->