def _makeVO(self, vehicleCD, index): vehicle = self.itemsCache.items.getItemByCD(vehicleCD) complectation = _ms( VEH_COMPARE.cartpopover_configurationtype( self.comparisonBasket.getVehicleAt( index).getConfigurationType())) iconFunc = RES_ICONS.maps_icons_vehicletypes_elite if vehicle.isPremium else RES_ICONS.maps_icons_vehicletypes basketLocked = self.comparisonBasket.isLocked return { 'id': vehicleCD, 'index': index, 'vehicleName': text_styles.main(vehicle.shortUserName), 'complectation': complectation, 'nation': getNationsFilterAssetPath(AVAILABLE_NAMES[vehicle.nationID]), 'level': vehicle.level, 'typeStr': iconFunc(vehicle.type + '.png'), 'smallIconPath': vehicle.iconSmall, 'removeBtnTooltip': VEH_COMPARE.CARTPOPOVER_REMOVELOCKEDBTN_TOOLTIP if basketLocked else VEH_COMPARE.CARTPOPOVER_REMOVEBTN_TOOLTIP, 'removeBtnEnabled': not basketLocked }
def _makeVO(self, vehicleCD, index): vehicle = g_itemsCache.items.getItemByCD(vehicleCD) if vehicle.isPremium: moduleType = 'premium' else: moduleType = self.comparisonBasket.getVehicleAt(index).getModulesType() complectation = _ms(VEH_COMPARE.cartpopover_moduletype(moduleType)) return {'id': vehicleCD, 'index': index, 'vehicleName': text_styles.main(vehicle.shortUserName), 'complectation': complectation, 'nation': getNationsFilterAssetPath(AVAILABLE_NAMES[vehicle.nationID]), 'level': vehicle.level, 'typeStr': vehicle.type, 'smallIconPath': vehicle.iconSmall, 'removeBtnTooltip': VEH_COMPARE.CARTPOPOVER_REMOVEBTN_TOOLTIP}