def updateVehicle(self, vehicle): if self.__inited: Waiting.show('loadHangarSpaceVehicle', True) igrRoomType = game_control.g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() updatedVehCompactDescr = getCustomizedVehCompDescr(igrLayout, vehicle.invID, igrRoomType, vehicle.descriptor.makeCompactDescr()) self.__space.recreateVehicle(self._stripVehCompDescrIfRoaming(updatedVehCompactDescr), vehicle.modelState, self.__changeDone) self.__lastUpdatedVehicle = vehicle
def updateVehicle(self, vehicle, historicalBattle = None): if self.__inited: Waiting.show('loadHangarSpaceVehicle', True) historicalBattleDef = None if historicalBattle is not None and historicalBattle.canParticipateWith(vehicle.intCD): historicalBattleDef = historicalBattle.getData() igrRoomType = game_control.g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() updatedVehCompactDescr = getCustomizedVehCompDescr(igrLayout, vehicle.invID, igrRoomType, vehicle.descriptor.makeCompactDescr(), historicalBattleDef) self.__space.recreateVehicle(self._stripVehCompDescrIfRoaming(updatedVehCompactDescr), vehicle.modelState, self.__changeDone) self.__lastUpdatedVehicle = vehicle
def getCustomizedDescriptor(self): if self.invID > 0: from gui.LobbyContext import g_lobbyContext igrRoomType = self.igrCtrl.getRoomType() igrLayout = {self.invID: self.igrCustomizationsLayout} updatedVehCompactDescr = getCustomizedVehCompDescr(igrLayout, self.invID, igrRoomType, self.descriptor.makeCompactDescr()) serverSettings = g_lobbyContext.getServerSettings() if serverSettings is not None and serverSettings.roaming.isInRoaming(): updatedVehCompactDescr = vehicles.stripCustomizationFromVehicleCompactDescr(updatedVehCompactDescr, True, True, False)[0] return vehicles.VehicleDescr(compactDescr=updatedVehCompactDescr) else: return self.descriptor return
def getCustomizedDescriptor(self): if self.invID > 0: from gui import game_control from gui.LobbyContext import g_lobbyContext igrRoomType = game_control.g_instance.igr.getRoomType() igrLayout = {self.invID: self.igrCustomizationsLayout} updatedVehCompactDescr = getCustomizedVehCompDescr(igrLayout, self.invID, igrRoomType, self.descriptor.makeCompactDescr()) serverSettings = g_lobbyContext.getServerSettings() if serverSettings is not None and serverSettings.roaming.isInRoaming(): updatedVehCompactDescr = vehicles.stripCustomizationFromVehicleCompactDescr(updatedVehCompactDescr, True, True, False)[0] return vehicles.VehicleDescr(compactDescr=updatedVehCompactDescr) else: return self.descriptor return
def updateVehicle(self, vehicle, historicalBattle=None): if self.__inited: Waiting.show('loadHangarSpaceVehicle', True) historicalBattleDef = None if historicalBattle is not None and historicalBattle.canParticipateWith( vehicle.intCD): historicalBattleDef = historicalBattle.getData() igrRoomType = game_control.g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout( ) updatedVehCompactDescr = getCustomizedVehCompDescr( igrLayout, vehicle.invID, igrRoomType, vehicle.descriptor.makeCompactDescr(), historicalBattleDef) self.__space.recreateVehicle( self._stripVehCompDescrIfRoaming(updatedVehCompactDescr), vehicle.modelState, self.__changeDone) self.__lastUpdatedVehicle = vehicle