def __buildProgressData(self): rank = self.rankedController.getCurrentRank() rankID = rank.getID() rankLabel = '' if self.rankedController.isAccountMastered(): blocks = [ self.__packProgressInfo( RES_ICONS.MAPS_ICONS_RANKEDBATTLES_ICON_VICTORY, text_styles.vehicleName( _ms(RANKED_BATTLES. RANKEDBATTLEVIEW_PROGRESSBLOCK_FINALRANK, rank=rankID))), self.__packRank(rank), self.__packProgressInfo( RES_ICONS.MAPS_ICONS_RANKEDBATTLES_ICON_FINAL_CUP_150X100, text_styles.vehicleName( _ms(RANKED_BATTLES. RANKEDBATTLEVIEW_PROGRESSBLOCK_CONTINUE))) ] else: blocks = [ self.__packRank(rank) for rank in self.rankedController.getRanksChain() if rank.getID() != 0 ] if rankID > 0: rankLabel = text_styles.neutral( _ms(RANKED_BATTLES. RANKEDBATTLEVIEW_PROGRESSBLOCK_CURRENTRANK, rank=text_styles.stats(rankID))) return {'blocks': blocks, 'currentRankLabel': rankLabel}
def __makeVehicleVO(vehicle): return { 'nationIcon': '../maps/icons/filters/nations/%s.png' % vehicle.nationName, 'typeIcon': '../maps/icons/filters/tanks/%s.png' % vehicle.type, 'levelIcon': '../maps/icons/filters/levels/level_%s.png' % vehicle.level, 'vehicleIcon': vehicle.iconSmall, 'vehicleName': text_styles.vehicleName(vehicle.shortUserName) }
def __buildProgressData(self): if self.rankedController.isAccountMastered(): rank = self.rankedController.getCurrentRank() result = [ self.__packProgressInfo( RES_ICONS.MAPS_ICONS_RANKEDBATTLES_ICON_VICTORY, text_styles.vehicleName( _ms(RANKED_BATTLES. RANKEDBATTLEVIEW_PROGRESSBLOCK_FINALRANK))), self.__packRank(rank), self.__packProgressInfo( RES_ICONS.MAPS_ICONS_RANKEDBATTLES_ICON_FINAL_CUP_150X100, text_styles.vehicleName( _ms(RANKED_BATTLES. RANKEDBATTLEVIEW_PROGRESSBLOCK_CONTINUE))) ] else: result = [ self.__packRank(rank) for rank in self.rankedController.getRanksChain() if rank.getID() != 0 ] return result