Esempio n. 1
0
 def __disableRoyaleMode(self):
     storedVehInvID = AccountSettings.getFavorites(CURRENT_VEHICLE)
     if not storedVehInvID:
         criteria = REQ_CRITERIA.INVENTORY | ~REQ_CRITERIA.VEHICLE.HAS_TAGS(
             [VEHICLE_TAGS.BATTLE_ROYALE])
         vehicle = first(
             self.__itemsCache.items.getVehicles(
                 criteria=criteria).values())
         if vehicle:
             storedVehInvID = vehicle.invID
     if storedVehInvID:
         g_currentVehicle.selectVehicle(storedVehInvID)
     else:
         g_currentVehicle.selectNoVehicle()
     self.__voControl.deactivate()
 def __enableRoyaleMode(self):
     royaleVehicleID = AccountSettings.getFavorites(ROYALE_VEHICLE)
     if not royaleVehicleID or self.__itemsCache.items.getVehicle(
             royaleVehicleID) is None:
         criteria = REQ_CRITERIA.VEHICLE.HAS_TAGS(
             [VEHICLE_TAGS.BATTLE_ROYALE]) | REQ_CRITERIA.INVENTORY
         vehicles = self.__itemsCache.items.getVehicles
         royaleVehicle = first(
             sorted(vehicles(criteria=criteria).values(),
                    key=lambda item: item.intCD))
         if royaleVehicle:
             royaleVehicleID = royaleVehicle.invID
     if royaleVehicleID:
         g_currentVehicle.selectVehicle(royaleVehicleID)
     else:
         g_currentVehicle.selectNoVehicle()
     self.__voControl.activate()
     return
 def __enableRoyaleMode(self):
     royaleVehicleID = AccountSettings.getFavorites(ROYALE_VEHICLE)
     if not royaleVehicleID or self.__itemsCache.items.getVehicle(
             royaleVehicleID) is None:
         criteria = REQ_CRITERIA.VEHICLE.HAS_TAGS(
             [VEHICLE_TAGS.BATTLE_ROYALE]) | REQ_CRITERIA.INVENTORY
         vehicles = self.__itemsCache.items.getVehicles
         values = vehicles(criteria=criteria).values()
         royaleVehicle = first(
             sorted(
                 values,
                 key=lambda item:
                 (item.isRented, GUI_NATIONS_ORDER_INDEX[item.nationName],
                  VEHICLE_TYPES_ORDER_INDICES[item.type], item.userName)))
         if royaleVehicle:
             royaleVehicleID = royaleVehicle.invID
     if self.__c11nVisible:
         pass
     elif royaleVehicleID:
         g_currentVehicle.selectVehicle(royaleVehicleID)
     else:
         g_currentVehicle.selectNoVehicle()
     self.__voControl.activate()
     return
Esempio n. 4
0
 def swap(self):
     self.__settings = g_settingsCore.serverSettings.getSection(SETTINGS_SECTIONS.FALLOUT, _SETTINGS_DEFAULTS)
     self.__intCDs = AccountSettings.getFavorites(FALLOUT_VEHICLES)
     self.validateSelectedVehicles()