def idealCrewComparator(vehicle): vehicleParamsObject = params.VehicleParams(vehicle) vehicleParams = vehicleParamsObject.getParamsDict() bonuses = vehicleParamsObject.getBonuses(vehicle) penalties = vehicleParamsObject.getPenalties(vehicle) compatibleArtefacts = g_paramsCache.getCompatibleArtefacts(vehicle) idealCrewVehicle = copy.copy(vehicle) idealCrewVehicle.crew = vehicle.getPerfectCrew() perfectVehicleParams = params.VehicleParams(idealCrewVehicle).getParamsDict() return VehiclesComparator(vehicleParams, perfectVehicleParams, compatibleArtefacts, bonuses, penalties)
def vehiclesComparator(comparableVehicle, vehicle): return VehiclesComparator( params.VehicleParams(comparableVehicle).getParamsDict(), params.VehicleParams(vehicle).getParamsDict(), suitableArtefacts=g_paramsCache.getCompatibleArtefacts( vehicle.descriptor))
def postProgressionVehiclesComparator(comparableVehicle, vehicle): vehicleParamsObject = params.VehicleParams(comparableVehicle) return VehiclesComparator(vehicleParamsObject.getParamsDict(), params.VehicleParams(_getIdealCrewVehicle(vehicle)).getParamsDict(), suitableArtefacts=g_paramsCache.getCompatibleArtefacts(comparableVehicle), bonuses=vehicleParamsObject.getBonuses(comparableVehicle, False), penalties=vehicleParamsObject.getPenalties(comparableVehicle) if vehicle.isInInventory else None)
def tankSetupVehiclesComparator(comparableVehicle, vehicle): vehicleParamsObject = params.VehicleParams(comparableVehicle) return VehiclesComparator(vehicleParamsObject.getParamsDict(), params.VehicleParams(_getIdealCrewVehicle(vehicle)).getParamsDict(), suitableArtefacts=g_paramsCache.getCompatibleArtefacts(vehicle), bonuses=vehicleParamsObject.getBonuses(vehicle), penalties=vehicleParamsObject.getPenalties(vehicle))
def previewVehiclesComparator(comparableVehicle, vehicle): return VehiclesComparator(params.VehicleParams(comparableVehicle).getParamsDict(), params.VehicleParams(vehicle).getParamsDict(), suitableArtefacts=g_paramsCache.getCompatibleArtefacts(comparableVehicle), bonuses=params.VehicleParams(comparableVehicle).getBonuses(comparableVehicle, False))