Пример #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
Пример #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
Пример #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
Пример #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
Пример #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)
Пример #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
Пример #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)