예제 #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
파일: hangarspace.py 프로젝트: webiumsk/WoT
 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)