Ejemplo n.º 1
0
 def __makeSettingsBlockVO(self, isTopBlock):
     if isTopBlock:
         minFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
     else:
         minFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
     return {'startLvlSrc': fort_formatters.getIconLevel(minFortLevel),
      'endLvlSrc': fort_formatters.getIconLevel(maxFortLevel),
      'buildingIcon': FORTIFICATION_ALIASES.FORT_BASE_BUILDING,
      'lvlDashTF': self.app.utilsManager.textManager.getText(TEXT_MANAGER_STYLES.STATS_TEXT, '-'),
      'defenceTankIcon': defenceTankIcon,
      'attackTankIconTop': attackTankIconTop,
      'attackTankIconBottom': attackTankIconBottom}
Ejemplo n.º 2
0
 def __makeSettingsBlockVO(self, isTopBlock):
     if isTopBlock:
         minFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
     else:
         minFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
     return {'startLvlSrc': fort_formatters.getIconLevel(minFortLevel),
      'endLvlSrc': fort_formatters.getIconLevel(maxFortLevel),
      'buildingIcon': FortViewHelper.getSmallIconSource(FORTIFICATION_ALIASES.FORT_BASE_BUILDING, maxFortLevel),
      'lvlDashTF': text_styles.stats('-'),
      'defenceTankIcon': defenceTankIcon,
      'attackTankIconTop': attackTankIconTop,
      'attackTankIconBottom': attackTankIconBottom}
Ejemplo n.º 3
0
 def __makeSettingsBlockVO(self, isTopBlock):
     if isTopBlock:
         minFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.CHAMPION.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
     else:
         minFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.minFortLevel
         maxFortLevel = FORT_BATTLE_DIVISIONS.ABSOLUTE.maxFortLevel
         defenceTankIcon = attackTankIconTop = self.__makeTankIconVO(False, FORT_BATTLE_DIVISIONS.ABSOLUTE.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_FORTIFICATION_USSR_T62A, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.ABSOLUTE.iconLevel), FORT_BATTLE_DIVISIONS.ABSOLUTE.divisionID)
         attackTankIconBottom = self.__makeTankIconVO(True, FORT_BATTLE_DIVISIONS.CHAMPION.maxCombatants, RES_ICONS.MAPS_ICONS_LIBRARY_USA_A12_T32, fort_formatters.getIconLevel(FORT_BATTLE_DIVISIONS.CHAMPION.iconLevel), FORT_BATTLE_DIVISIONS.CHAMPION.divisionID)
     return {'startLvlSrc': fort_formatters.getIconLevel(minFortLevel),
      'endLvlSrc': fort_formatters.getIconLevel(maxFortLevel),
      'buildingIcon': FortViewHelper.getSmallIconSource(FORTIFICATION_ALIASES.FORT_BASE_BUILDING, maxFortLevel),
      'lvlDashTF': text_styles.stats('-'),
      'defenceTankIcon': defenceTankIcon,
      'attackTankIconTop': attackTankIconTop,
      'attackTankIconBottom': attackTankIconBottom}
Ejemplo n.º 4
0
 def _makeVO(self, index, item, favorites):
     timestamp = item.getAvailability()
     defHour, defMin = item.getDefHourFor(timestamp)
     defenceStart = time_utils.getTimeForLocal(timestamp, defHour, defMin)
     defenceFinish = defenceStart + time_utils.ONE_HOUR
     defenceTime = '%s - %s' % (BigWorld.wg_getShortTimeFormat(defenceStart), BigWorld.wg_getShortTimeFormat(defenceFinish))
     return {'clanID': item.getClanDBID(),
      'levelIcon': getIconLevel(item.getLevel()),
      'clanTag': '[%s]' % item.getClanAbbrev(),
      'defenceTime': defenceTime,
      'defenceStartTime': int('%02d%02d' % (defHour, defMin)),
      'avgBuildingLvl': round(item.getAvgBuildingLevel(), 1),
      'isFavorite': item.getClanDBID() in favorites,
      'clanLvl': item.getLevel()}