Fix trade title showing "Buying in vehicleX" when in sell mode

Tested and confirmed working as intended now.
This commit is contained in:
ebaydayz
2016-05-04 16:46:35 -04:00
parent 85869b32f1
commit 349e0a103d
4 changed files with 12 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ _weaps = _this select 0;
_mags = _this select 1; _mags = _this select 1;
_extraText = _this select 2; _extraText = _this select 2;
_vehTrade = false; _vehTrade = false;
if (call Z_checkCloseVehicle) then { if (false call Z_checkCloseVehicle) then {
_all = _weaps + _mags + [(typeOf Z_vehicle)]; _all = _weaps + _mags + [(typeOf Z_vehicle)];
_vehTrade = true; _vehTrade = true;
} else { } else {

View File

@@ -13,6 +13,12 @@ if(!isNull _vehicle)then{
Z_vehicle = _vehicle; Z_vehicle = _vehicle;
systemChat format[localize "STR_EPOCH_TRADE_SELECTED",typeOf Z_vehicle]; systemChat format[localize "STR_EPOCH_TRADE_SELECTED",typeOf Z_vehicle];
_result = true; _result = true;
[format[localize "STR_EPOCH_TRADE_BUYING_IN", typeOf Z_vehicle]] call Z_filleTradeTitle; if (_this) then { // Set trade title, don't set on menu start up since gear is selected initially.
if (Z_Selling) then {
[format[localize "STR_EPOCH_TRADE_SELLING_FROM", typeOf Z_vehicle]] call Z_filleTradeTitle;
} else {
[format[localize "STR_EPOCH_TRADE_BUYING_IN", typeOf Z_vehicle]] call Z_filleTradeTitle;
};
};
}; };
_result _result

View File

@@ -54,7 +54,7 @@ if(Z_Selling)then{
case 1: { case 1: {
Z_SellingFrom = 1; Z_SellingFrom = 1;
[localize "STR_EPOCH_TRADE_BUYING_VEHICLE"] call Z_filleTradeTitle; [localize "STR_EPOCH_TRADE_BUYING_VEHICLE"] call Z_filleTradeTitle;
_canBuyInVehicle = call Z_checkCloseVehicle; _canBuyInVehicle = true call Z_checkCloseVehicle;
if(_canBuyInVehicle)then{ if(_canBuyInVehicle)then{
[1] call Z_calculateFreeSpace; [1] call Z_calculateFreeSpace;
}else{ }else{

View File

@@ -15794,6 +15794,9 @@
<English>Buying in %1.</English> <English>Buying in %1.</English>
<Russian>Покупка в %1.</Russian> <Russian>Покупка в %1.</Russian>
</Key> </Key>
<Key ID="STR_EPOCH_TRADE_SELLING_FROM">
<English>Selling from %1.</English>
</Key>
<Key ID="STR_EPOCH_TRADE_TOTAL_SPACE_SUCCEEDED"> <Key ID="STR_EPOCH_TRADE_TOTAL_SPACE_SUCCEEDED">
<English>Total space succeeded: Mag=1, Tool=1, Side=5, Primary=10 slots and your bag capacity is %1 where you tried %2 slots.</English> <English>Total space succeeded: Mag=1, Tool=1, Side=5, Primary=10 slots and your bag capacity is %1 where you tried %2 slots.</English>
</Key> </Key>