def __makePreviewVehicleFromStrCD(self, vehicleStrCD): vehicle = Vehicle(strCompactDescr=vehicleStrCD, proxy=self.itemsCache.items) for slotID, device in enumerate(vehicle.optDevices): if device is not None: vehicle.descriptor.removeOptionalDevice(slotID) vehicle.optDevices[slotID] = None vehicle.crew = vehicle.getPerfectCrew() return vehicle
def __makePreviewVehicleFromStrCD(self, vehicleCD, vehicleStrCD): items = self.itemsCache.items vehicle = Vehicle(strCompactDescr=vehicleStrCD, proxy=items, extData=items.inventory.getVehExtData(vehicleCD)) for slotID, device in enumerate(vehicle.optDevices.installed): if device is not None: vehicle.descriptor.removeOptionalDevice(slotID) vehicle.optDevices.installed[slotID] = None vehicle.crew = vehicle.getPerfectCrew() return vehicle