コード例 #1
0
def _packNoGuiCondition(event):
    titleArgs = (i18n.makeString(QUESTS.DETAILS_CONDITIONS_TARGET_TITLE), )
    descrArgs = (event.getDescription(), )
    return formatters.packMissionIconCondition(
        FormattableField(FORMATTER_IDS.SIMPLE_TITLE,
                         titleArgs), MISSIONS_ALIASES.NONE,
        FormattableField(FORMATTER_IDS.DESCRIPTION, descrArgs),
        CONDITION_ICON.FOLDER)
コード例 #2
0
def _packPlayBattleCondition():
    titleArgs = (i18n.makeString(QUESTS.DETAILS_CONDITIONS_PLAYBATTLE_TITLE), )
    descrArgs = (i18n.makeString(
        QUESTS.MISSIONDETAILS_CONDITIONS_PLAYBATTLE), )
    return formatters.packMissionIconCondition(
        FormattableField(FORMATTER_IDS.SIMPLE_TITLE,
                         titleArgs), MISSIONS_ALIASES.NONE,
        FormattableField(FORMATTER_IDS.DESCRIPTION, descrArgs),
        CONDITION_ICON.BATTLES)
コード例 #3
0
 def _getTitle(cls, condition):
     return FormattableField(
         FORMATTER_IDS.RELATION,
         (condition.relationValue, condition.relation,
          events_fmts.RELATIONS_SCHEME.DEFAULT, cls._getTitleKey(condition)
          )) if condition.isAnyVehicleAcceptable() else FormattableField(
              FORMATTER_IDS.COMPLEX_RELATION,
              (condition.relationValue, condition.relation,
               cls._getTitleKey(condition)))
コード例 #4
0
 def getPlayBattleCondition(packer=PreFormattedConditionModelPacker):
     titleArgs = (i18n.makeString(
         QUESTS.DETAILS_CONDITIONS_PLAYBATTLE_TITLE), )
     descrArgs = (i18n.makeString(
         QUESTS.MISSIONDETAILS_CONDITIONS_PLAYBATTLE), )
     playBattleCondition = formatters.packMissionIconCondition(
         FormattableField(FORMATTER_IDS.SIMPLE_TITLE,
                          titleArgs), MISSIONS_ALIASES.NONE,
         FormattableField(FORMATTER_IDS.DESCRIPTION, descrArgs),
         CONDITION_ICON.BATTLES)
     return packer.pack(playBattleCondition, CONDITION_DEFAULT_NAME)
コード例 #5
0
ファイル: postbattle.py プロジェクト: kusaku/wot_scripts
 def _getTitle(cls, condition):
     label, relation, relationI18nType, value = getResultsData(condition)
     topRangeUpper, topRangeLower = condition.getMaxRange()
     if topRangeLower < TOP_RANGE_LOWEST:
         return packSimpleTitle(i18n.makeString(QUESTS.DETAILS_CONDITIONS_TOP_TITLE, value=topRangeLower))
     elif value is None:
         return super(_BattleResultsFormatter, cls)._getTitle()
     elif condition.keyName == 'markOfMastery':
         return packSimpleTitle(value)
     else:
         return FormattableField(FORMATTER_IDS.RELATION, (value, relation, relationI18nType))
コード例 #6
0
 def _getTitle(cls, current, total):
     return FormattableField(FORMATTER_IDS.CUMULATIVE,
                             (int(current), int(total)))
コード例 #7
0
 def _getComplexTitle(cls, current, total):
     return FormattableField(FORMATTER_IDS.COMPLEX,
                             (int(current), int(total)))
コード例 #8
0
ファイル: postbattle.py プロジェクト: kusaku/wot_scripts
 def _getTitle(cls, condition):
     return FormattableField(FORMATTER_IDS.RELATION, (condition.relationValue, condition.relation))
コード例 #9
0
ファイル: postbattle.py プロジェクト: kusaku/wot_scripts
 def _getTitle(cls, condition):
     return FormattableField(FORMATTER_IDS.RELATION, (condition.relationValue,
      condition.relation,
      RELATIONS_SCHEME.DEFAULT,
      cls._getTitleKey(condition)))
コード例 #10
0
ファイル: formatters.py プロジェクト: kusaku/wot_scripts
 def _getTitle(cls, *args, **kwargs):
     return FormattableField(
         FORMATTER_IDS.SIMPLE_TITLE,
         (i18n.makeString(QUESTS.DETAILS_CONDITIONS_TARGET_TITLE), ))