コード例 #1
0
 def _populate(self):
     super(TankCarousel, self)._populate()
     g_playerEvents.onBattleResultsReceived += self.__onFittingUpdate
     self.lobbyContext.getServerSettings(
     ).onServerSettingsChange += self.__onServerSettingsUpdate
     self.__settingsCore.onSettingsChanged += self.__onSettingsChanged
     self.restoreCtrl.onRestoreChangeNotify += self.__onFittingUpdate
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.nyController.onDataUpdated += self.__onVehicleBranchUpdated
     self.nyController.onStateChanged += self.__onVehicleBranchStateChanged
     self._vehBranchEnabled = self.nyController.isVehicleBranchEnabled()
     g_clientUpdateManager.addCallbacks({
         'stats.credits': self.__onFittingUpdate,
         'stats.gold': self.__onFittingUpdate,
         'stats.vehicleSellsLeft': self.__onFittingUpdate,
         'stats.slots': self.__onFittingUpdate,
         'goodies': self.__onFittingUpdate,
         'tokens': self.__onTokensUpdate
     })
     setting = self.settingsCore.options.getSetting(
         settings_constants.GAME.CAROUSEL_TYPE)
     self.as_rowCountS(setting.getRowCount())
     setting = self.settingsCore.options.getSetting(
         settings_constants.GAME.DOUBLE_CAROUSEL_TYPE)
     self.as_setSmallDoubleCarouselS(setting.enableSmallCarousel())
     self.as_initCarouselFilterS(
         self._getInitialFilterVO(
             getFilterSetupContexts(
                 self.itemsCache.items.shop.dailyXPFactor)))
     self._lastVehicleBranch = set(
         self.itemsCache.items.festivity.getVehicleBranch())
コード例 #2
0
 def updateVehicles(self, vehicles=None, filterCriteria=None):
     super(TankCarousel, self).updateVehicles(vehicles, filterCriteria)
     if vehicles is None and filterCriteria is None:
         self.as_initCarouselFilterS(
             self._getInitialFilterVO(
                 getFilterSetupContexts(
                     self.itemsCache.items.shop.dailyXPFactor)))
     return
コード例 #3
0
 def __onVehicleBranchStateChanged(self):
     branchEnabled = self.nyController.isVehicleBranchEnabled()
     if branchEnabled == self._vehBranchEnabled:
         return
     self._vehBranchEnabled = branchEnabled
     self.filter.newYearReset()
     if self._carouselDP:
         self._carouselDP.updateVehicleBranch()
         self.__updateNewYearVehicles(self._lastVehicleBranch -
                                      {EMPTY_VEH_INV_ID})
     self.as_initCarouselFilterS(
         self._getInitialFilterVO(
             getFilterSetupContexts(
                 self.itemsCache.items.shop.dailyXPFactor)))
     self.applyFilter()
コード例 #4
0
 def _populate(self):
     super(TankCarousel, self)._populate()
     g_playerEvents.onBattleResultsReceived += self.__onFittingUpdate
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     g_clientUpdateManager.addCallbacks({
         'stats.credits': self.__onFittingUpdate,
         'stats.gold': self.__onFittingUpdate,
         'stats.vehicleSellsLeft': self.__onFittingUpdate,
         'stats.slots': self.__onFittingUpdate,
         'goodies': self.__onFittingUpdate
     })
     setting = self.settingsCore.options.getSetting(
         settings_constants.GAME.CAROUSEL_TYPE)
     self.as_rowCountS(setting.getRowCount())
     setting = self.settingsCore.options.getSetting(
         settings_constants.GAME.DOUBLE_CAROUSEL_TYPE)
     self.as_setSmallDoubleCarouselS(setting.enableSmallCarousel())
     self.as_initCarouselFilterS(
         self._getInitialFilterVO(
             getFilterSetupContexts(
                 self.itemsCache.items.shop.dailyXPFactor)))
コード例 #5
0
 def _populate(self):
     super(BattleTankCarousel, self)._populate()
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.as_useExtendedCarouselS(True)
     self.as_initCarouselFilterS(
         self._getInitialFilterVO(getFilterSetupContexts(1)))