From f04d581b4d095b9d0486748353f6599617a03e18 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Tue, 16 Aug 2016 17:07:33 -0400 Subject: [PATCH] Cleanup Adv Trade parseText formatting Just added line breaks so it is easier to count the format order. --- .../functions/z_at_displayBackpackInfo.sqf | 40 ++++++-- .../functions/z_at_displayItemInfo.sqf | 31 +++++- .../functions/z_at_displayVehicleInfo.sqf | 99 ++++++++++++++----- .../functions/z_at_displayWeaponInfo.sqf | 31 +++++- 4 files changed, 165 insertions(+), 36 deletions(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayBackpackInfo.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayBackpackInfo.sqf index 0b2b77728..d87378004 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayBackpackInfo.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayBackpackInfo.sqf @@ -33,8 +33,6 @@ if (isNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines')) }; if (Z_SingleCurrency) then { - _buyCurrency = CurrencyName; - _sellCurrency = CurrencyName; _formattedText = format [ "
" + "%10: %2
" + @@ -42,8 +40,22 @@ if (Z_SingleCurrency) then { "%13: %6 %4
" + "%12: %5 %7
" + "%14: %8
" + - "%15: %9
" - , _picture, _display, _class, _buyCurrency, [_sellPrice] call BIS_fnc_numberText, [_buyPrice] call BIS_fnc_numberText, _sellCurrency, _transportMaxWeapons,_transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291", localize "STR_EPOCH_WEPS", localize "STR_EPOCH_MAGS" + "%15: %9
", + _picture, + _display, + _class, + CurrencyName, + [_sellPrice] call BIS_fnc_numberText, + [_buyPrice] call BIS_fnc_numberText, + CurrencyName, + _transportMaxWeapons, + _transportMaxMagazines, + localize "STR_EPOCH_NAME", + localize "STR_EPOCH_CLASS", + localize "STR_EPOCH_PLAYER_292", + localize "STR_EPOCH_PLAYER_291", + localize "STR_EPOCH_WEPS", + localize "STR_EPOCH_MAGS" ]; } else { _picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture'); @@ -58,8 +70,24 @@ if (Z_SingleCurrency) then { "%13: %6 %4
" + "%12: %5 %7
" + "%14: %8
" + - "%15: %9
" - , _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", localize "STR_EPOCH_WEPS", localize "STR_EPOCH_MAGS", _picSell, _picBuy + "%15: %9
", + _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", + localize "STR_EPOCH_WEPS", + localize "STR_EPOCH_MAGS", + _picSell, + _picBuy ]; }; diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayItemInfo.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayItemInfo.sqf index 381980e5c..48fe7d261 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayItemInfo.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayItemInfo.sqf @@ -56,8 +56,18 @@ if (Z_SingleCurrency) then { "%8: %2
" + "%9: %3
" + "%11: %6 %7
" + - "%10: %5 %7
" - , _picture, _display, _class, 'lazy', [_sellPrice] call BIS_fnc_numberText, [_buyPrice] call BIS_fnc_numberText, CurrencyName, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291" + "%10: %5 %7
", + _picture, + _display, + _class, + 'lazy', + [_sellPrice] call BIS_fnc_numberText, + [_buyPrice] call BIS_fnc_numberText, + 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'); @@ -69,8 +79,21 @@ if (Z_SingleCurrency) then { "%11: %2
" + "%12: %3
" + "%14: %6 %9
" + - "%13: %5 %7
" - , _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" + "%13: %5 %7
", + _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" ]; }; diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayVehicleInfo.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayVehicleInfo.sqf index 7f70c8cb9..7fd9fc345 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayVehicleInfo.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayVehicleInfo.sqf @@ -116,17 +116,43 @@ _wepText = ""; if (Z_SingleCurrency) then { _formattedText = format [ - "
" + - "%10: %2
" + - "%11: %3
" + - "%13: %6 %7
" + - "%12: %5 %7
" + - "%14: %9 %8 %4
" + - "%17: %18 %24: %25
" + // Armor / Seats - "%21 %22: %23 %19: %20
" + // MaxSpeed / Fuel - "%26: %27" // Weapons - , _picture, _display, _class, _transportmaxBackpacks, [_sellPrice] call BIS_fnc_numberText, [_buyPrice] call BIS_fnc_numberText, CurrencyName, _transportMaxWeapons,_transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291", localize "STR_EPOCH_CARGO_SPACE", "\z\addons\dayz_code\gui\gear\gear_ui_slots_weapons_white.paa", "\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa", - localize "STR_EPOCH_ARMOR",_armor,localize "STR_EPOCH_FUEL",_fuelCapacity,localize "STR_EPOCH_MAX",localize "STR_EPOCH_SPEED",_maxSpeed,localize "STR_EPOCH_SEATS",_seats,localize "STR_EPOCH_WEAPONS",_wepText,"\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa" + "
" + + "%10: %2
" + + "%11: %3
" + + "%13: %6 %7
" + + "%12: %5 %7
" + + "%14: %9 %8 %4
" + + "%17: %18 %24: %25
" + // Armor / Seats + "%21 %22: %23 %19: %20
" + // MaxSpeed / Fuel + "%26: %27", + _picture, + _display, + _class, + _transportmaxBackpacks, + [_sellPrice] call BIS_fnc_numberText, + [_buyPrice] call BIS_fnc_numberText, + CurrencyName, + _transportMaxWeapons, + _transportMaxMagazines, + localize "STR_EPOCH_NAME", + localize "STR_EPOCH_CLASS", + localize "STR_EPOCH_PLAYER_292", + localize "STR_EPOCH_PLAYER_291", + localize "STR_EPOCH_CARGO_SPACE", + "\z\addons\dayz_code\gui\gear\gear_ui_slots_weapons_white.paa", + "\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa", + localize "STR_EPOCH_ARMOR", + _armor, + localize "STR_EPOCH_FUEL", + _fuelCapacity, + localize "STR_EPOCH_MAX", + localize "STR_EPOCH_SPEED", + _maxSpeed, + localize "STR_EPOCH_SEATS", + _seats, + localize "STR_EPOCH_WEAPONS", + _wepText, + "\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa" ]; } else { _picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture'); @@ -135,17 +161,46 @@ if (Z_SingleCurrency) then { _buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName'); _formattedText = format [ - "
" + - "%13: %2
" + - "%14: %3
" + - "%16: %6 %7
" + - "%15: %5 %10
" + - "%17: %8 %9 %4
" + - "%20: %21 %27: %28
" + // Armor / Seats - "%24 %25: %26 %22: %23
" + // MaxSpeed / Fuel - "%29: %30" // Weapons - , _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", localize "STR_EPOCH_CARGO_SPACE", "\z\addons\dayz_code\gui\gear\gear_ui_slots_weapons_white.paa", "\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa", - localize "STR_EPOCH_ARMOR",_armor,localize "STR_EPOCH_FUEL",_fuelCapacity,localize "STR_EPOCH_MAX",localize "STR_EPOCH_SPEED",_maxSpeed,localize "STR_EPOCH_SEATS",_seats,localize "STR_EPOCH_WEAPONS",_wepText,"\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa" + "
" + + "%13: %2
" + + "%14: %3
" + + "%16: %6 %7
" + + "%15: %5 %10
" + + "%17: %8 %9 %4
" + + "%20: %21 %27: %28
" + // Armor / Seats + "%24 %25: %26 %22: %23
" + // MaxSpeed / Fuel + "%29: %30", + _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", + localize "STR_EPOCH_CARGO_SPACE", + "\z\addons\dayz_code\gui\gear\gear_ui_slots_weapons_white.paa", + "\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa", + localize "STR_EPOCH_ARMOR", + _armor, + localize "STR_EPOCH_FUEL", + _fuelCapacity, + localize "STR_EPOCH_MAX", + localize "STR_EPOCH_SPEED", + _maxSpeed, + localize "STR_EPOCH_SEATS", + _seats, + localize "STR_EPOCH_WEAPONS", + _wepText, + "\z\addons\dayz_code\gui\gear\gear_ui_slots_backpacks_white.paa" ]; }; diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayWeaponInfo.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayWeaponInfo.sqf index 5974b5941..c0f206349 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayWeaponInfo.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_displayWeaponInfo.sqf @@ -67,8 +67,18 @@ if (Z_SingleCurrency) then { "%8: %2
" + "%9: %3
" + "%11: %6 %7
" + - "%10: %5 %7
" - , _picture, _display, _class, _magText, [_sellPrice] call BIS_fnc_numberText, [_buyPrice] call BIS_fnc_numberText, CurrencyName, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291" + "%10: %5 %7
", + _picture, + _display, + _class, + _magText, + [_sellPrice] call BIS_fnc_numberText, + [_buyPrice] call BIS_fnc_numberText, + 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'); @@ -81,8 +91,21 @@ if (Z_SingleCurrency) then { "%11: %2
" + "%12: %3
" + "%14: %6 %8
" + - "%13: %5 %7
" - , _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" + "%13: %5 %7
", + _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" ]; };