Пример #1
0
 def _getPreformattedTankwomanBonus(self, operation):
     _, total = _getTankwomansCountInOperation(operation)
     return PreformattedBonus(
         bonusName=self._TANKWOMAN_BONUS,
         label=formatCountLabel(total),
         images=dict(
             ((size, RES_ICONS.getBonusIcon(size, self._TANKWOMAN_BONUS))
              for size in AWARDS_SIZES.ALL())),
         labelFormatter=text_styles.stats,
         align=LABEL_ALIGN.RIGHT,
         specialAlias=TOOLTIPS_CONSTANTS.PERSONAL_MISSIONS_TANKWOMAN,
         isSpecial=True,
         specialArgs=[]) if total else None
Пример #2
0
 def _getPreformattedTankwomanBonus(self, operation):
     if not operation.isFullCompleted():
         current, total = _getTankwomansCountInOperation(operation)
         currentStr = text_styles.bonusAppliedText(
             current) if current else text_styles.stats(current)
         images = dict(((size, RES_ICONS.getBonusIcon(size, 'tankwoman'))
                        for size in AWARDS_SIZES.ALL()))
         return PreformattedBonus(bonusName=self._TANKWOMAN_BONUS,
                                  label='%s / %s' %
                                  (currentStr, str(total)),
                                  images=images,
                                  labelFormatter=text_styles.main)
     else:
         return None