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)
def _parseVehiclesDescrsList(cls, name, dossier): return getTankExpertRequirements(dossier.getBlock('vehTypeFrags')).get( name, []) if dossier is not None else []
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 []
def _getVehiclesDescrsList(self, dossier, proxy): return getTankExpertRequirements( dossier.getRecord('vehTypeFrags')).get(self.name, [])