Advanced trading tidying, spelling fixes, private fixes and string fixes (#1716)

* Advanced trading tidying, spelling fixes, private fixes and string fixes.

Fixes snap building issue with metal floors
Fixed spelling mistakes in various scripts
Fixed formatting uglyness in various scripts
Fixed invalid private lines in various scripts
Changed Advanced trading so buying worked more like selling, You can't
select backpack if you don't have a pack nor can you select a vehicle if
you don't have a vehicle.
Removed some redundant strings from Advanced trading and changed a few
of the strings to be more englishy
Removed the ability to buy a backpack into your backpack (You cant do
this anyway)
Fixed a bug where if you had nothing in your backpack it would break the
checkArrayInConfig script so the titlebar would not refresh correctly
Removed slot counts on no backpack and no vehicle (No need for it, just
clutter)
Moved backpack/vehicle checking to z_at_getContainer.sqf

* Last part of tidyness fixes

Last part of tidyness fixes

* Actual backpack fix

Lets actually fix the buying backpack into backpack or backpack when you
already have one.

* Missing from commit

Missing from commit
This commit is contained in:
oiad
2016-07-31 02:03:00 +12:00
committed by ebaydayz
parent 1d2fc3b266
commit 7c4d25ef1a
59 changed files with 536 additions and 538 deletions

View File

@@ -3,46 +3,46 @@
*
* Calculate the total price for single currency.
**/
private ["_sellPrice","_ctrltext","_bTotal"];
private ["_sellPrice","_ctrlText","_bTotal"];
#include "defines.hpp"
_bTotal = 0;
_sellPrice = 0;
if(Z_SingleCurrency) then {
_ctrltext = '';
if(Z_Selling)then{
if (Z_SingleCurrency) then {
_ctrlText = "";
if (Z_Selling) then {
{
_sellPrice = _sellPrice + (_x select 2);
}count Z_SellArray;
_ctrltext = format["%1 %2", _sellPrice , CurrencyName];
_sellPrice = _sellPrice + (_x select 2);
} count Z_SellArray;
_ctrlText = format["%1 %2", _sellPrice , CurrencyName];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText format ["%1 (%2 items)", localize "STR_EPOCH_TRADE_SELLING", count Z_SellArray];
} else {
{
_sellPrice = _sellPrice + ((_x select 2) * (_x select 9));
_bTotal = _bTotal + (_x select 9);
}count Z_BuyingArray;
_ctrltext = format["%1 %2", _sellPrice , CurrencyName];
_sellPrice = _sellPrice + ((_x select 2) * (_x select 9));
_bTotal = _bTotal + (_x select 9);
} count Z_BuyingArray;
_ctrlText = format["%1 %2", _sellPrice , CurrencyName];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText format ["%1 (%2 items)", localize "STR_EPOCH_TRADE_BUYING", _bTotal];
};
ctrlSetText [Z_AT_PRICEDISPLAY, _ctrltext];
ctrlSetText [Z_AT_PRICEDISPLAY, _ctrlText];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_PRICEINFO) ctrlSetStructuredText parseText '';
} else {
if(Z_Selling)then {
_ctrltext = "";
if (Z_Selling) then {
_ctrlText = "";
{
_sellPrice = _sellPrice + ((_x select 2) * (_x select 11));
}count Z_SellArray;
_ctrltext = _sellPrice call Z_calcDefaultCurrency;
_sellPrice = _sellPrice + ((_x select 2) * (_x select 11));
} count Z_SellArray;
_ctrlText = _sellPrice call Z_calcDefaultCurrency;
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText format ["%1 (%2 items)", localize "STR_EPOCH_TRADE_SELLING", count Z_SellArray];
} else {
{
_sellPrice = _sellPrice + ((_x select 2) * (_x select 11) * (_x select 9));
_bTotal = _bTotal + (_x select 9);
}count Z_BuyingArray;
_ctrltext = _sellPrice call Z_calcDefaultCurrency;
_sellPrice = _sellPrice + ((_x select 2) * (_x select 11) * (_x select 9));
_bTotal = _bTotal + (_x select 9);
} count Z_BuyingArray;
_ctrlText = _sellPrice call Z_calcDefaultCurrency;
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText format ["%1 (%2 items)", localize "STR_EPOCH_TRADE_BUYING", _bTotal];
};
ctrlSetText [Z_AT_PRICEDISPLAY, ''];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_PRICEINFO) ctrlSetStructuredText parseText _ctrltext;
ctrlSetText [Z_AT_PRICEDISPLAY, ''];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_PRICEINFO) ctrlSetStructuredText parseText _ctrlText;
};