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

View File

@@ -57,19 +57,20 @@ if (Z_SingleCurrency) then {
"<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'>%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 />",
_picture,
_display,
_class,
'lazy',
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,
localize "STR_EPOCH_NAME",
localize "STR_EPOCH_CLASS",
localize "STR_EPOCH_PLAYER_292",
localize "STR_EPOCH_PLAYER_291"
localize "STR_EPOCH_PLAYER_291",
if (_buyPrice >= 0) then {CurrencyName} else {""}
];
} else {
_picSell = "";
@@ -81,7 +82,10 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "picture");
_buyCurrency = getText (configFile >> "CfgMagazines" >> _buyCurrency >> "displayName");
} else {
_buyCurrency = "";
};
_formattedText = format [
"<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 />" +
@@ -93,7 +97,7 @@ if (Z_SingleCurrency) then {
_class,
'lazy',
if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_sellCurrency,
_picSell,
_buyCurrency,

View File

@@ -117,7 +117,7 @@ if (Z_SingleCurrency) then {
"<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'>%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'>%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
@@ -127,7 +127,7 @@ if (Z_SingleCurrency) then {
_class,
_transportmaxBackpacks,
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,
_transportMaxWeapons,
_transportMaxMagazines,
@@ -147,7 +147,8 @@ if (Z_SingleCurrency) then {
_maxSpeed,
localize "STR_EPOCH_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 {
_picSell = "";
@@ -159,6 +160,8 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
} else {
_buyCurrency = "";
};
_formattedText = format [
@@ -175,7 +178,7 @@ if (Z_SingleCurrency) then {
_class,
_transportmaxBackpacks,
if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_buyCurrency,
_transportMaxWeapons,
_transportMaxMagazines,

View File

@@ -66,19 +66,20 @@ if (Z_SingleCurrency) then {
"<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'>%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 />",
_picture,
_display,
_class,
_magText,
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,
localize "STR_EPOCH_NAME",
localize "STR_EPOCH_CLASS",
localize "STR_EPOCH_PLAYER_292",
localize "STR_EPOCH_PLAYER_291"
localize "STR_EPOCH_PLAYER_291",
if (_buyPrice >= 0) then {CurrencyName} else {""}
];
} else {
_picSell = "";
@@ -90,7 +91,10 @@ if (Z_SingleCurrency) then {
if (_buyPrice >= 0) then {
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
} else {
_buyCurrency = "";
};
_formattedText = format [
"<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 />" +
@@ -102,7 +106,7 @@ if (Z_SingleCurrency) then {
_class,
_magText,
if (_sellPrice >= 0) then {_sellPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {"";},
if (_buyPrice >= 0) then {_buyPrice} else {localize "STR_EPOCH_TRADE_UNBUYABLE";},
_sellCurrency,
_buyCurrency,
_picSell,

View File

@@ -13471,6 +13471,11 @@
<German>Motorrad M1030 (Grün)</German>
<Russian>Мотоцикл M1030 (Зелёный)</Russian>
</Key>
<Key ID="STR_VEH_NAME_SUBMARINE">
<English>Submarine</English>
<German>U-Boot</German>
<Russian>Подводная лодка</Russian>
</Key>
<Key ID="STR_VEH_NAME_RHIB_M2">
<English>RHIB (M2)</English>
<Russian>НЛЖК (M2)</Russian>
@@ -13478,7 +13483,7 @@
<Key ID="STR_VEH_NAME_RHIB_MK19">
<English>RHIB (MK 19)</English>
<Russian>НЛЖК (MK 19)</Russian>
</Key>
</Key>
<Key ID="STR_VEH_NAME_PBX">
<English>PBX Rubber Boat</English>
<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>
<Russian>Некоторые изменения скрыты в вашем инвентаре. Уменьшите количество предметов в инвентаре, чтобы увидеть изменения!</Russian>
</Key>
<Key ID="STR_EPOCH_TRADE_UNBUYABLE">
<English>Unbuyable</English>
<German>Nicht kaufbar</German>
<Russian>Невозможно купить</Russian>
</Key>
<!-- PLOT MANAGEMENT BELOW -->