Beispiel #1
0
def _stripVehCompDescrIfRoaming(vehCompDescr):
    serverSettings = g_lobbyContext.getServerSettings()
    if serverSettings:
        if serverSettings.roaming.isInRoaming():
            vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(
                vehCompDescr, True, True, False)[0]
    return vehCompDescr
Beispiel #2
0
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
Beispiel #3
0
 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
Beispiel #4
0
 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
Beispiel #5
0
 def _stripVehCompDescrIfRoaming(self, vehCompDescr):
     if game_control.g_instance.roaming.isInRoaming():
         vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(vehCompDescr, True, True, False)[0]
     return vehicles.VehicleDescr(compactDescr=vehCompDescr)
Beispiel #6
0
def _stripVehCompDescrIfRoaming(vehCompDescr):
    serverSettings = g_lobbyContext.getServerSettings()
    if serverSettings:
        if serverSettings.roaming.isInRoaming():
            vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(vehCompDescr, True, True, False)[0]
    return vehCompDescr
Beispiel #7
0
 def _stripVehCompDescrIfRoaming(self, vehCompDescr):
     if game_control.g_instance.roaming.isInRoaming():
         vehCompDescr = vehicles.stripCustomizationFromVehicleCompactDescr(vehCompDescr, True, True, False)[0]
     return vehicles.VehicleDescr(compactDescr=vehCompDescr)