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)
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)
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)))
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)
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))
def _getTitle(cls, current, total): return FormattableField(FORMATTER_IDS.CUMULATIVE, (int(current), int(total)))
def _getComplexTitle(cls, current, total): return FormattableField(FORMATTER_IDS.COMPLEX, (int(current), int(total)))
def _getTitle(cls, condition): return FormattableField(FORMATTER_IDS.RELATION, (condition.relationValue, condition.relation))
def _getTitle(cls, condition): return FormattableField(FORMATTER_IDS.RELATION, (condition.relationValue, condition.relation, RELATIONS_SCHEME.DEFAULT, cls._getTitleKey(condition)))
def _getTitle(cls, *args, **kwargs): return FormattableField( FORMATTER_IDS.SIMPLE_TITLE, (i18n.makeString(QUESTS.DETAILS_CONDITIONS_TARGET_TITLE), ))