Localize some Advanced Trading strings

This commit is contained in:
ebaydayz
2016-05-01 15:45:00 -04:00
parent d25ad694d8
commit 2806d6a00d
15 changed files with 241 additions and 69 deletions

View File

@@ -1,6 +1,9 @@
// Moved to dayz_code/configVariables.sqf
/*
Z_AT_FolderLocation = '\z\addons\dayz_code\actions\AdvancedTrading';
Z_VehicleDistance = 30; // Distance that a vehicle needs to be to see it's content or to sell it.
Z_SingleCurrency = false; // Does your server use a single currency system.
Z_AllowTakingMoneyFromBackpack = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack.
Z_AllowTakingMoneyFromVehicle = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle.
Z_MoneyVariable = "cashMoney"; // If using a Single currency system, change this to whatever currency you are using.
*/

View File

@@ -2,13 +2,13 @@
Z_Selling = !Z_Selling;
if(Z_Selling)then{
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SELLBUYTOGGLE) ctrlSetText "Buy";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText "Selling";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SELLBUYTOGGLE) ctrlSetText localize "STR_EPOCH_PLAYER_291";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText localize "STR_EPOCH_TRADE_SELLING";
{ctrlShow [_x,true];} forEach [Z_AT_SELLABLELIST,Z_AT_SELLINGLIST,Z_AT_SELLBUTTON,Z_AT_ADDSELLITEMBUTTON,Z_AT_ADDALLSELLITEMBUTTON,Z_AT_REMOVESELLITEMBUTTON,Z_AT_REMOVEALLSELLITEMBUTTON]; // show
{ctrlShow [_x,false];} forEach [Z_AT_BUYABLELIST,Z_AT_BUYINGLIST,Z_AT_BUYBUTTON,Z_AT_ADDBUYITEMBUTTON,Z_AT_BUYINGAMOUNT,Z_AT_REMOVEBUYITEMBUTTON,Z_AT_REMOVEALLBUYITEMBUTTON,Z_AT_SLOTSDISPLAY]; // hide
}else{
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SELLBUYTOGGLE) ctrlSetText "Sell";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText "Buying";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SELLBUYTOGGLE) ctrlSetText localize "STR_EPOCH_PLAYER_292";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText localize "STR_EPOCH_TRADE_BUYING";
{ctrlShow [_x,true];} forEach [Z_AT_BUYABLELIST,Z_AT_BUYINGLIST,Z_AT_BUYBUTTON,Z_AT_ADDBUYITEMBUTTON,Z_AT_BUYINGAMOUNT,Z_AT_REMOVEBUYITEMBUTTON,Z_AT_REMOVEALLBUYITEMBUTTON,Z_AT_SLOTSDISPLAY]; // show
{ctrlShow [_x,false];} forEach [Z_AT_SELLABLELIST,Z_AT_SELLINGLIST,Z_AT_SELLBUTTON,Z_AT_ADDSELLITEMBUTTON,Z_AT_ADDALLSELLITEMBUTTON,Z_AT_REMOVESELLITEMBUTTON,Z_AT_REMOVEALLSELLITEMBUTTON]; // hide
call Z_calcBuyableList;

View File

@@ -117,13 +117,13 @@ if(_total > 0)then{
};
if (Z_SingleCurrency) then {
_ctrltext = format["I would offer %1 %2.", _totalPrice,CurrencyName];
_ctrltext = format[localize "STR_EPOCH_TRADE_OFFER", _totalPrice,CurrencyName];
ctrlSetText [Z_AT_TRADERLINE2, _ctrltext];
} else {
ctrlSetText [Z_AT_TRADERLINE2, ''];
};
_ctrltext = format["I accept %1 items from %2.", count(Z_SellableArray) , _extraText];
_ctrltext = format[localize "STR_EPOCH_TRADE_ACCEPT", count(Z_SellableArray) , _extraText];
ctrlSetText [Z_AT_TRADERLINE1, _ctrltext];
call Z_fillSellList;

View File

@@ -42,13 +42,13 @@ if ( Z_SingleCurrency ) then {
_formattedText = format [
"<img image='%1' size='3' align='center'/><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 %4</t><br />" +
"<t color='#33BFFF'>%10: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%12: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>%13: </t><t color='#ffffff'>%6 %4</t><br />" +
"<t color='#33BFFF'>Mags: </t><t color='#ffffff'>%8</t><br />" +
"<t color='#33BFFF'>Weaps:</t><t color='#ffffff'>%9</t><br />"
, _picture, _display, _class, _buyCurrency , _sellPrice, _buyPrice, _sellCurrency, _transportMaxWeapons,_transportMaxMagazines
, _picture, _display, _class, _buyCurrency , _sellPrice, _buyPrice, _sellCurrency, _transportMaxWeapons,_transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;

View File

@@ -21,11 +21,11 @@ if (Z_Selling) then {
if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' align='center'/><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 %7</t><br />"
, _picture, _display, _class, 'lazy', _sellPrice, _buyPrice, CurrencyName
"<t color='#33BFFF'>%8: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%9: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%10: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%6 %7</t><br />"
, _picture, _display, _class, 'lazy', _sellPrice, _buyPrice, CurrencyName, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
} else {
_picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture');
@@ -34,11 +34,11 @@ if (Z_SingleCurrency) then {
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
_formattedText = format [
"<img image='%1' size='3' align='center'/><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 <img image='%8' /> %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 <img image='%10' /> %9</t><br />"
, _picture, _display, _class, 'lazy', _sellPrice, _buyPrice, _sellCurrency , _picSell , _buyCurrency, _picBuy
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%12: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%13: </t><t color='#ffffff'>%5 <img image='%8' /> %7</t><br />" +
"<t color='#33BFFF'>%14: </t><t color='#ffffff'>%6 <img image='%10' /> %9</t><br />"
, _picture, _display, _class, 'lazy', _sellPrice, _buyPrice, _sellCurrency , _picSell , _buyCurrency, _picBuy, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
};
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;

View File

@@ -50,14 +50,14 @@ if ( isNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxBackpacks')
if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' /><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 %7</t><br />" +
"<t color='#33BFFF'>%10: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%12: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>%13: </t><t color='#ffffff'>%6 %7</t><br />" +
"<t color='#33BFFF'>Mags: </t><t color='#ffffff'>%9</t><br />" +
"<t color='#33BFFF'>Weaps: </t><t color='#ffffff'>%8</t><br />" +
"<t color='#33BFFF'>Backs: </t><t color='#ffffff'>%4</t><br />"
, _picture, _display, _class, _transportmaxBackpacks, _sellPrice, _buyPrice, CurrencyName, _transportMaxWeapons,_transportMaxMagazines
, _picture, _display, _class, _transportmaxBackpacks, _sellPrice, _buyPrice, CurrencyName, _transportMaxWeapons,_transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
@@ -69,14 +69,14 @@ if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' /><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 <img image='%11' /> %10</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 <img image='%12' /> %7</t><br />" +
"<t color='#33BFFF'>%13: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%14: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%15: </t><t color='#ffffff'>%5 <img image='%11' /> %10</t><br />" +
"<t color='#33BFFF'>%16: </t><t color='#ffffff'>%6 <img image='%12' /> %7</t><br />" +
"<t color='#33BFFF'>Mags: </t><t color='#ffffff'>%8</t><br />" +
"<t color='#33BFFF'>Weaps: </t><t color='#ffffff'>%9</t><br />" +
"<t color='#33BFFF'>Backs: </t><t color='#ffffff'>%4</t><br />"
, _picture, _display, _class, _transportmaxBackpacks, _sellPrice, _buyPrice, _buyCurrency, _transportMaxWeapons,_transportMaxMagazines, _sellCurrency, _picSell,_picBuy
, _picture, _display, _class, _transportmaxBackpacks, _sellPrice, _buyPrice, _buyCurrency, _transportMaxWeapons,_transportMaxMagazines, _sellCurrency, _picSell,_picBuy, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];

View File

@@ -40,12 +40,12 @@ _magText = "";
if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' align='center' /><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 %7</t><br />" +
"<t color='#33BFFF'>%8: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%9: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%10: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%6 %7</t><br />" +
"<t color='#33BFFF'>Mags: </t><br /><t color='#ffffff' size='0.5'>%4</t>"
, _picture, _display, _class, _magText, _sellPrice, _buyPrice, CurrencyName
, _picture, _display, _class, _magText, _sellPrice, _buyPrice, CurrencyName, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
}else {
_picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture');
@@ -55,12 +55,12 @@ if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' align='center' /><br />" +
"<t color='#33BFFF'>Name: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Class: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Sell: </t><t color='#ffffff'>%5 <img image='%9' /> %7</t><br />" +
"<t color='#33BFFF'>Buy: </t><t color='#ffffff'>%6 <img image='%10' /> %8</t><br />" +
"<t color='#33BFFF'>%11: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>%12: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>%13: </t><t color='#ffffff'>%5 <img image='%9' /> %7</t><br />" +
"<t color='#33BFFF'>%14: </t><t color='#ffffff'>%6 <img image='%10' /> %8</t><br />" +
"<t color='#33BFFF'>Mags: </t><br /><t color='#ffffff' size='0.5'>%4</t>"
, _picture, _display, _class, _magText, _sellPrice, _buyPrice, _sellCurrency, _buyCurrency, _picSell, _picBuy
, _picture, _display, _class, _magText, _sellPrice, _buyPrice, _sellCurrency, _buyCurrency, _picSell, _picBuy, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291"
];
};

View File

@@ -45,9 +45,9 @@ if (!isNull _backpack) then {
[_normalMags,_normalWeaps, typeOf _backpack] call Z_checkArrayInConfig;
}else{
_ctrltext = format["I'm not stupid."];
_ctrltext = localize "STR_EPOCH_TRADE_STUPID";
ctrlSetText [Z_AT_TRADERLINE2, _ctrltext];
_ctrltext = format["You are not wearing a backpack."];
_ctrltext = localize "STR_EPOCH_TRADE_NO_BACKPACK";
ctrlSetText [Z_AT_TRADERLINE1, _ctrltext];
};

View File

@@ -23,17 +23,17 @@ call Z_calcPrice;
if(Z_Selling)then{
switch (_lbIndex) do {
case 0: {
["Selling from backpack."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_SELLING_BACKPACK"] call Z_filleTradeTitle;
Z_SellingFrom = 0;
call Z_getBackpackItems;
};
case 1: {
["Selling from vehicle."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_SELLING_VEHICLE"] call Z_filleTradeTitle;
Z_SellingFrom = 1;
call Z_getVehicleItems;
};
case 2: {
["Selling from gear."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_SELLING_GEAR"] call Z_filleTradeTitle;
Z_SellingFrom = 2;
call Z_getGearItems;
};
@@ -42,29 +42,29 @@ if(Z_Selling)then{
_ctrltext = format[" "];
ctrlSetText [Z_AT_TRADERLINE2, _ctrltext];
_ctrltext = format["These are all the items I'm selling."];
_ctrltext = localize "STR_EPOCH_TRADE_SELLING_ALL";
ctrlSetText [Z_AT_TRADERLINE1, _ctrltext];
switch (_lbIndex) do {
case 0: {
Z_SellingFrom = 0;
["Buying in backpack."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_BUYING_BACKPACK"] call Z_filleTradeTitle;
[0] call Z_calculateFreeSpace;
};
case 1: {
Z_SellingFrom = 1;
["Buying in vehicle."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_BUYING_VEHICLE"] call Z_filleTradeTitle;
_canBuyInVehicle = call Z_checkCloseVehicle;
if(_canBuyInVehicle)then{
[1] call Z_calculateFreeSpace;
}else{
systemChat format["Get in the driver seat to be able to trade to your vehicle."];
systemChat localize "STR_EPOCH_PLAYER_245";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SLOTSDISPLAY) ctrlSetText format["%1 / %2 / %3",0,0,0];
};
};
case 2: {
Z_SellingFrom = 2;
["Buying in gear."] call Z_filleTradeTitle;
[localize "STR_EPOCH_TRADE_BUYING_GEAR"] call Z_filleTradeTitle;
[2] call Z_calculateFreeSpace;
};
};

View File

@@ -121,7 +121,7 @@ if(_index > -1)then{
_vehCheckArray set [count(_vehCheckArray),[_x select 2, _x select 11]];
};
} else {
systemChat format["Get in the driver seat to be able to trade to your vehicle."];
systemChat localize "STR_EPOCH_PLAYER_245";
};
};
};

View File

@@ -10,7 +10,7 @@ if(DZE_ActionInProgress) exitWith { localize "str_player_actionslimit" call dayz
if(isNil "Z_AdvancedTradingInit")then{
//#include "config.sqf";
//#include "config.sqf"; // Moved to dayz_code/configVariables.sqf
#include "\z\addons\dayz_code\actions\AdvancedTrading\functions\defines.sqf";
/* Configs that needs to be defined but not changed in config file */