Ejemplo n.º 1
0
 def _getDescription(cls, condition):
     labelKey = cls._getLabelKey(condition)
     if condition.isAnyVehicleAcceptable():
         labelKey = '%s/all' % labelKey
     if condition.isNegative():
         labelKey = '%s/not' % labelKey
     return packDescriptionField(labelKey)
 def _getDescription(self, condition):
     isAllAlive = condition.isAllAlive()
     key = 'alive' if isAllAlive else 'alive/not'
     description = i18n.makeString(
         '#quests:details/conditions/results/%s/%s' %
         (condition.getUnitKey(), key))
     return packDescriptionField(description)
Ejemplo n.º 3
0
 def _getDescription(self, condition):
     key = '#quests:details/conditions/installedModule/%s' % condition.getItemType(
     )
     moduleNames = ', '.join(
         [item.userName for item in condition.getItemsList()])
     if condition.isNegative():
         key = '%s/not' % key
     return packDescriptionField(
         i18n.makeString(key, moduleNames=moduleNames))
Ejemplo n.º 4
0
 def getDescription(self, condition):
     """
     Gets condition's custom description if it is defined,
     else return standard conditions description
     """
     customDescription = condition.getCustomDescription()
     if customDescription is not None:
         return packDescriptionField(customDescription)
     else:
         return self._getDescription(condition)
Ejemplo n.º 5
0
    def _getDescription(self, condition):
        camos = []
        for camo in condition.getCamos2ids():
            camoI18key = '#quests:details/conditions/clanKills/camo/%s' % str(camo)
            if i18n.doesTextExist(camoI18key):
                camos.append(i18n.makeString(camoI18key))

        i18nKey = '#quests:details/conditions/clanKills'
        if condition.isNegative():
            i18nKey = '%s/not' % i18nKey
        return packDescriptionField(i18n.makeString(i18nKey, camos=', '.join(camos)))
Ejemplo n.º 6
0
 def _getDescription(self, condition):
     bonusData = condition.getBonusData()
     if bonusData is not None and bonusData.isInRow():
         descr = i18n.makeString(
             QUESTS.MISSIONDETAILS_CONDITIONS_BATTLESINROW,
             total=condition.getTotalValue())
     elif condition.hasUpperLimit():
         descr = i18n.makeString(
             QUESTS.MISSIONDETAILS_CONDITIONS_BATTLESUPPERLIMIT,
             total=condition.getTotalValue())
     elif self.__hasPostBattleConditions:
         descr = i18n.makeString(QUESTS.MISSIONDETAILS_CONDITIONS_BATTLES,
                                 total=condition.getTotalValue())
     else:
         descr = i18n.makeString(QUESTS.DETAILS_DOSSIER_BATTLESCOUNT)
     return packDescriptionField(descr)
Ejemplo n.º 7
0
 def _getDescription(self, condition):
     return packDescriptionField(condition.getUserString())
Ejemplo n.º 8
0
 def _getDescription(self, condition):
     return packDescriptionField('')
Ejemplo n.º 9
0
 def _getDescription(self, condition):
     key = '#quests:details/conditions/crits/%s/%s' % (condition.getCritType(), condition.getCritName())
     if condition.isNegative():
         key = '%s/not' % key
     return packDescriptionField(i18n.makeString(key))
Ejemplo n.º 10
0
 def _getDescription(self, condition):
     label, _, _, _ = getResultsData(condition)
     return packDescriptionField(i18n.makeString(label))
Ejemplo n.º 11
0
 def _getDescription(cls, condition):
     key = _makeKeyNegativeIf(QUESTS.DETAILS_CONDITIONS_MULTISTUNEVENT, condition.isNegative())
     return packDescriptionField(i18n.makeString(key, count=condition.stunnedByShot))
Ejemplo n.º 12
0
 def _getDescription(self, condition):
     key = formatters.getAchievementsConditionKey(condition)
     iconTexts = [ _packAchieveElement(idx) for idx in condition.getValue() ]
     description = '%s %s' % (i18n.makeString('#quests:details/conditions/%s' % key), ', '.join(iconTexts))
     return packDescriptionField(description)
Ejemplo n.º 13
0
 def _getDescription(self, condition):
     key = 'installedCamouflage' if condition.getValue() else 'noInstalledCamouflage'
     return packDescriptionField(i18n.makeString('#quests:details/conditions/%s' % key))
Ejemplo n.º 14
0
 def _getDescription(self, condition):
     return packDescriptionField(QUESTS.DETAILS_CONDITIONS_ALIVE_DESCRIPTION)
 def getDescription(self, condition):
     customDescription = condition.getCustomDescription()
     return packDescriptionField(
         customDescription
     ) if customDescription is not None else self._getDescription(condition)