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

@@ -1,11 +1,11 @@
/**
* call Z_getContainer
*
* Switches between selling and buying and the item container (gear/vehicle/bakcpack) and initiates item loading.
* Switches between selling and buying and the item container (gear/vehicle/backpack) and initiates item loading.
**/
private ["_lbIndex","_canBuyInVehicle"];
private ["_lbIndex","_canBuyInVehicle","_backpack"];
#include "defines.hpp"
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SLOTSDISPLAY) ctrlSetText format["0 / 0 / 0"];
if (Z_Selling) then {
call Z_clearBuyingList;
Z_BuyingArray = [];
@@ -15,22 +15,34 @@ Z_SellableArray = [];
Z_SellArray = [];
_lbIndex = _this select 0;
_backpack = unitBackpack player;
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText "";
call Z_calcPrice;
if(Z_Selling)then{
if (Z_Selling) then {
switch (_lbIndex) do {
case 0: {
[localize "STR_EPOCH_TRADE_SELLING_BACKPACK"] call Z_filleTradeTitle;
Z_SellingFrom = 0;
call Z_getBackpackItems;
if (!isNull _backpack) then {
[localize "STR_EPOCH_TRADE_SELLING_BACKPACK"] call Z_filleTradeTitle;
Z_SellingFrom = 0;
call Z_getBackpackItems;
} else {
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_NO_BACKPACK"];
ctrlSetText [Z_AT_SLOTSDISPLAY, " "];
};
};
case 1: {
[localize "STR_EPOCH_TRADE_SELLING_VEHICLE"] call Z_filleTradeTitle;
Z_SellingFrom = 1;
call Z_getVehicleItems;
_canBuyInVehicle = true call Z_checkCloseVehicle;
if (_canBuyInVehicle) then {
[localize "STR_EPOCH_TRADE_SELLING_VEHICLE"] call Z_filleTradeTitle;
Z_SellingFrom = 1;
call Z_getVehicleItems;
} else {
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_PLAYER_245"];
ctrlSetText [Z_AT_SLOTSDISPLAY, " "];
};
};
case 2: {
[localize "STR_EPOCH_TRADE_SELLING_GEAR"] call Z_filleTradeTitle;
@@ -38,24 +50,29 @@ if(Z_Selling)then{
call Z_getGearItems;
};
};
}else{
} else {
ctrlSetText [Z_AT_TRADERLINE2, " "];
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_SELLING_ALL"];
switch (_lbIndex) do {
case 0: {
Z_SellingFrom = 0;
[localize "STR_EPOCH_TRADE_BUYING_BACKPACK"] call Z_filleTradeTitle;
[0] call Z_calculateFreeSpace;
if (!isNull _backpack) then {
Z_SellingFrom = 0;
[localize "STR_EPOCH_TRADE_BUYING_BACKPACK"] call Z_filleTradeTitle;
[0] call Z_calculateFreeSpace;
} else {
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_NO_BACKPACK"];
ctrlSetText [Z_AT_SLOTSDISPLAY, " "];
};
};
case 1: {
Z_SellingFrom = 1;
[localize "STR_EPOCH_TRADE_BUYING_VEHICLE"] call Z_filleTradeTitle;
_canBuyInVehicle = true call Z_checkCloseVehicle;
if(_canBuyInVehicle)then{
if (_canBuyInVehicle) then {
Z_SellingFrom = 1;
[localize "STR_EPOCH_TRADE_BUYING_VEHICLE"] call Z_filleTradeTitle;
[1] call Z_calculateFreeSpace;
}else{
systemChat localize "STR_EPOCH_PLAYER_245";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SLOTSDISPLAY) ctrlSetText format["%1 / %2 / %3",0,0,0];
} else {
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_PLAYER_245"];
ctrlSetText [Z_AT_SLOTSDISPLAY, " "];
};
};
case 2: {