private ['_item', '_type','_picture',"_class","_display","_transportMaxWeapons","_transportMaxMagazines","_transportmaxBackpacks" ,"_buyPrice","_sellPrice","_buyCurrency","_sellCurrency","_formattedText","_fuelCapacity","_maxSpeed","_armor","_seats","_weapons", "_weapons2","_config","_wepText","_turret","_text"]; #include "defines.hpp" _item = _this select 0; _picture = _item select 4; _class = _item select 0; _display = _item select 3; _fuelCapacity = 0; _maxSpeed = 0; _armor = 0; _seats = 0; _weapons = []; _transportMaxWeapons = 0; _transportMaxMagazines = 0; _transportmaxBackpacks = 0; _buyPrice = 0; _sellPrice = 0; if (Z_Selling) then { _buyPrice = _item select 6; _buyCurrency = _item select 8; _sellPrice = _item select 2; _sellCurrency = _item select 7; } else { _buyPrice = _item select 2; _buyCurrency = _item select 7; _sellPrice = _item select 6; _sellCurrency = _item select 8; }; _config = configFile >> 'CfgVehicles' >> _class; if (isNumber (_config >> 'transportMaxWeapons')) then { _transportMaxWeapons = getNumber (_config >> 'transportMaxWeapons'); }; if (isNumber (_config >> 'transportMaxMagazines')) then { _transportMaxMagazines = getNumber (_config >> 'transportMaxMagazines'); }; if (isNumber (_config >> 'transportMaxBackpacks')) then { _transportmaxBackpacks = getNumber (_config >> 'transportMaxBackpacks'); }; if (isNumber (_config >> 'fuelCapacity')) then { _fuelCapacity = if (_class isKindOf "Bicycle") then {0} else {getNumber (_config >> 'fuelCapacity')}; }; if (isNumber (_config >> 'maxSpeed')) then { _maxSpeed = getNumber (_config >> 'maxSpeed'); }; if (isNumber (_config >> 'armor')) then { _armor = getNumber (_config >> 'armor'); }; if (isNumber (_config >> 'transportSoldier')) then { _seats = getNumber (_config >> 'transportSoldier'); }; { if ((isNumber (_config >> _x)) && {getNumber (_config >> _x) > 0}) then { _seats = _seats + 1; }; } forEach ["hasDriver","hasGunner","hasCommander"]; if (isArray (_config >> 'weapons')) then { _weapons = getArray (_config >> 'weapons'); }; { _turret = _x; if (isArray (_config >> 'Turrets' >> _turret >> 'weapons')) then { { _weapons set [count _weapons,_x]; } forEach (getArray (_config >> 'Turrets' >> _turret >> 'weapons')); }; { if ((isNumber (_config >> 'Turrets' >> _turret >> _x)) && {getNumber (_config >> 'Turrets' >> _turret >> _x) > 0}) then { _seats = _seats + 1; }; } forEach ["hasDriver","hasGunner","hasCommander"]; } forEach ["MainTurret","BackTurret","SideTurret","RightDoorGun","BackDoorGun","LeftDoorGun","AGS30_Turret","PK_Turret"]; // Get weapon display names _weapons2 = []; { if !(["horn",_x] call fnc_inString) then { _text = getText (configFile >> 'CfgWeapons' >> _x >> 'displayName'); if (_text in _weapons2) then { _index = _weapons2 find _text; _weapons2 set [_index,_text + "x2"]; } else { _weapons2 set [count _weapons2,_text]; }; }; } forEach _weapons; if (count _weapons2 < 1) then {_weapons2 = [localize "STR_EPOCH_NONE"];}; _wepText = ""; { if (_forEachIndex > 0) then { _wepText = _wepText + ', ' + _x; } else { _wepText = _wepText + _x; }; } forEach _weapons2; if (Z_SingleCurrency) then { _formattedText = format [ "
" + "%10: %2
" + "%11: %3
" + "%13: %6 %7
" + "%12: %5 %7
" + "%14/%15/%16: %9/%8/%4
" + "%17: %18 %24: %25
" + // Armor / Seats "%21%22: %23 %19: %20
" + // MaxSpeed / Fuel "%26: %27" // Weapons , _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", localize "STR_EPOCH_MAGS", localize "STR_EPOCH_WEPS", localize "STR_EPOCH_BAGS", 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 ]; } else { _picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture'); _sellCurrency = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'displayName'); _picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture'); _buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName'); _formattedText = format [ "
" + "%13: %2
" + "%14: %3
" + "%16: %6 %7
" + "%15: %5 %10
" + "%17/%18/%19: %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_WEPS", localize "STR_EPOCH_MAGS", localize "STR_EPOCH_BAGS", 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 ]; }; (findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;