예제 #1
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)
예제 #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)
예제 #3
0
 def _parseVehiclesDescrsList(cls, name, dossier):
     return getTankExpertRequirements(dossier.getBlock('vehTypeFrags')).get(
         name, []) if dossier is not None else []
예제 #4
0
 def _getVehiclesDescrsList(self, dossier, proxy):
     return getTankExpertRequirements(dossier.getRecord('vehTypeFrags')).get(self.name, [])
예제 #5
0
 def _parseVehiclesDescrsList(cls, name, dossier):
     if dossier is not None:
         return getTankExpertRequirements(dossier.getBlock('vehTypeFrags')).get(name, [])
     else:
         return []
예제 #6
0
 def _getVehiclesDescrsList(self, dossier, proxy):
     return getTankExpertRequirements(
         dossier.getRecord('vehTypeFrags')).get(self.name, [])