def _stripVehCompDescrIfRoaming(vehCompDescr): serverSettings = g_lobbyContext.getServerSettings() if serverSettings: if serverSettings.roaming.isInRoaming(): vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr( vehCompDescr, True, True, False)[0] return vehCompDescr
def _stripVehCompDescrIfRoaming(vehCompDescr, lobbyContext=None): serverSettings = lobbyContext.getServerSettings( ) if lobbyContext is not None else None if serverSettings is not None: if serverSettings.roaming.isInRoaming(): vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr( vehCompDescr, True, True, False)[0] return vehCompDescr
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 _stripVehCompDescrIfRoaming(self, vehCompDescr): if game_control.g_instance.roaming.isInRoaming(): vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(vehCompDescr, True, True, False)[0] return vehicles.VehicleDescr(compactDescr=vehCompDescr)
def _stripVehCompDescrIfRoaming(vehCompDescr): serverSettings = g_lobbyContext.getServerSettings() if serverSettings: if serverSettings.roaming.isInRoaming(): vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(vehCompDescr, True, True, False)[0] return vehCompDescr