def checkTankExpertActivity(type, dossier):
    res = getTankExpertRequirements(dossier['vehTypeFrags'])
    if not len(res.get(type, [])):
        return (bool(dossier['achievements'][type]), None, 0)
    else:
        vList = __makeVehiclesList(res.get(type, []))
        vList.sort(__vehiclesListSort)
        fullVehListLength = len(vList)
        isActive = bool(dossier['achievements'][type])
        if fullVehListLength >= ACHIEVEMENT_VEHICLES_MAX:
            vList = vList[:ACHIEVEMENT_VEHICLES_SHOW]
        return (isActive, vList, fullVehListLength)
Beispiel #2
0
def checkTankExpertActivity(type, dossier):
    res = getTankExpertRequirements(dossier['vehTypeFrags'])
    if not len(res.get(type, [])):
        return (bool(dossier['achievements'][type]), None, 0)
    else:
        vList = __makeVehiclesList(res.get(type, []))
        vList.sort(__vehiclesListSort)
        fullVehListLength = len(vList)
        isActive = bool(dossier['achievements'][type])
        if fullVehListLength >= ACHIEVEMENT_VEHICLES_MAX:
            vList = vList[:ACHIEVEMENT_VEHICLES_SHOW]
        return (isActive, vList, fullVehListLength)
Beispiel #3
0
 def _parseVehiclesDescrsList(cls, name, dossier):
     return getTankExpertRequirements(dossier.getBlock('vehTypeFrags')).get(
         name, []) if dossier is not None else []
Beispiel #4
0
 def _getVehiclesDescrsList(self, dossier, proxy):
     return getTankExpertRequirements(dossier.getRecord('vehTypeFrags')).get(self.name, [])
 def _parseVehiclesDescrsList(cls, name, dossier):
     if dossier is not None:
         return getTankExpertRequirements(dossier.getBlock('vehTypeFrags')).get(name, [])
     else:
         return []
Beispiel #6
0
 def _getVehiclesDescrsList(self, dossier, proxy):
     return getTankExpertRequirements(
         dossier.getRecord('vehTypeFrags')).get(self.name, [])