def _populate(self): LobbySelectableView._populate(self) self.__isSpaceReadyForC11n = self.hangarSpace.spaceInited self.__isVehicleReadyForC11n = self.hangarSpace.isModelLoaded self.__checkVehicleCameraState() g_currentVehicle.onChanged += self.__onCurrentVehicleChanged self.hangarSpace.onVehicleChangeStarted += self.__onVehicleLoading self.hangarSpace.onVehicleChanged += self.__onVehicleLoaded self.hangarSpace.onSpaceRefresh += self.__onSpaceRefresh self.hangarSpace.onSpaceCreate += self.__onSpaceCreate self.igrCtrl.onIgrTypeChanged += self.__onIgrTypeChanged self.itemsCache.onSyncCompleted += self.onCacheResync self.rankedController.onUpdated += self.onRankedUpdate self.rankedController.onPrimeTimeStatusUpdated += self.__onRankedPrimeStatusUpdate self.epicSkillsController.onUpdated += self.__onEpicSkillsUpdate self.epicSkillsController.onPrimeTimeStatusUpdated += self.__onEpicSkillsUpdate self.hangarSpace.setVehicleSelectable(True) g_prbCtrlEvents.onVehicleClientStateChanged += self.__onVehicleClientStateChanged self.lobbyContext.getServerSettings( ).onServerSettingsChange += self.__onServerSettingChanged self._settingsCore.onSettingsChanged += self.__onSettingsChanged g_clientUpdateManager.addMoneyCallback(self.onMoneyUpdate) g_clientUpdateManager.addCallbacks({}) self.startGlobalListening() self.__updateAll() self.addListener(LobbySimpleEvent.WAITING_SHOWN, self.__onWaitingShown, EVENT_BUS_SCOPE.LOBBY) self.addListener(events.FightButtonEvent.FIGHT_BUTTON_UPDATE, self.__handleFightButtonUpdated, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.__handleSelectedEntityUpdated) self._onPopulateEnd() self.statsCollector.noteHangarLoadingState( HANGAR_LOADING_STATE.HANGAR_UI_READY, showSummaryNow=True)
def _populate(self): LobbySelectableView._populate(self) self.__isSpaceReadyForC11n = self.hangarSpace.spaceInited self.__isVehicleReadyForC11n = self.hangarSpace.isModelLoaded self.__checkVehicleCameraState() g_currentVehicle.onChanged += self.__onCurrentVehicleChanged self.hangarSpace.onVehicleChangeStarted += self.__onVehicleLoading self.hangarSpace.onVehicleChanged += self.__onVehicleLoaded self.hangarSpace.onSpaceRefresh += self.__onSpaceRefresh self.hangarSpace.onSpaceCreate += self.__onSpaceCreate self._festivityController.onStateChanged += self.__updateFestivityState self.igrCtrl.onIgrTypeChanged += self.__onIgrTypeChanged self.itemsCache.onSyncCompleted += self.onCacheResync self.rankedController.onUpdated += self.onRankedUpdate self.rankedController.onGameModeStatusTick += self.__updateAlertMessage self.__mapboxCtrl.onPrimeTimeStatusUpdated += self.__updateAlertMessage self.battleRoyaleController.onUpdated += self.__updateBattleRoyaleComponents self.epicController.onUpdated += self.__onEpicBattleUpdated self.epicController.onPrimeTimeStatusUpdated += self.__onEpicBattleUpdated self.epicController.onGameModeStatusTick += self.__updateAlertMessage self._promoController.onNewTeaserReceived += self.__onTeaserReceived self.hangarSpace.setVehicleSelectable(True) g_prbCtrlEvents.onVehicleClientStateChanged += self.__onVehicleClientStateChanged g_playerEvents.onPrebattleInvitationAccepted += self.__onPrebattleInvitationAccepted unitMgr = prb_getters.getClientUnitMgr() if unitMgr: unitMgr.onUnitJoined += self.__onUnitJoined g_clientUpdateManager.addCallbacks({'inventory': self.__updateAlertMessage}) self.lobbyContext.getServerSettings().onServerSettingsChange += self.__onServerSettingChanged self._settingsCore.onSettingsChanged += self.__onSettingsChanged self.__wotPlusInfo.onRenewableSubscriptionDataChanged += self.__onWotPlusDataChanged self.battlePassController.onSeasonStateChange += self.__switchCarousels self.startGlobalListening() self.__updateAll() self.addListener(LobbySimpleEvent.WAITING_SHOWN, self.__onWaitingShown, EVENT_BUS_SCOPE.LOBBY) self.addListener(events.FightButtonEvent.FIGHT_BUTTON_UPDATE, self.__handleFightButtonUpdated, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.__handleSelectedEntityUpdated) self.statsCollector.noteHangarLoadingState(HANGAR_LOADING_STATE.HANGAR_UI_READY, showSummaryNow=True) lobbyContext = dependency.instance(ILobbyContext) isCrewBooksEnabled = lobbyContext.getServerSettings().isCrewBooksEnabled() getTutorialGlobalStorage().setValue(GLOBAL_FLAG.CREW_BOOKS_ENABLED, isCrewBooksEnabled) self.__timer = CallbackDelayer() self.as_setNotificationEnabledS(crewBooksViewedCache().haveNewCrewBooks()) self._offersBannerController.showBanners() self.fireEvent(events.HangarCustomizationEvent(events.HangarCustomizationEvent.RESET_VEHICLE_MODEL_TRANSFORM), scope=EVENT_BUS_SCOPE.LOBBY) if g_currentVehicle.isPresent(): g_currentVehicle.refreshModel() if self.bootcampController.isInBootcamp(): self.as_setDQWidgetLayoutS(DAILY_QUESTS_WIDGET_CONSTANTS.WIDGET_LAYOUT_SINGLE)
def _populate(self): LobbySelectableView._populate(self) self.__isSpaceReadyForC11n = self.hangarSpace.spaceInited self.__isVehicleReadyForC11n = self.hangarSpace.isModelLoaded self.__checkVehicleCameraState() g_currentVehicle.onChanged += self.__onCurrentVehicleChanged self.hangarSpace.onVehicleChangeStarted += self.__onVehicleLoading self.hangarSpace.onVehicleChanged += self.__onVehicleLoaded self.hangarSpace.onSpaceRefresh += self.__onSpaceRefresh self.hangarSpace.onSpaceCreate += self.__onSpaceCreate self.igrCtrl.onIgrTypeChanged += self.__onIgrTypeChanged self.itemsCache.onSyncCompleted += self.onCacheResync self.rankedController.onUpdated += self.onRankedUpdate self.rankedController.onGameModeStatusTick += self.__updateAlertMessage self.battleRoyaleController.onUpdated += self.__updateBattleRoyaleComponents self.epicController.onUpdated += self.__onEpicSkillsUpdate self.epicController.onPrimeTimeStatusUpdated += self.__onEpicSkillsUpdate self._promoController.onNewTeaserReceived += self.__onTeaserReceived self.hangarSpace.setVehicleSelectable(True) g_prbCtrlEvents.onVehicleClientStateChanged += self.__onVehicleClientStateChanged g_clientUpdateManager.addCallbacks({'inventory': self.__updateAlertMessage}) self.lobbyContext.getServerSettings().onServerSettingsChange += self.__onServerSettingChanged self._settingsCore.onSettingsChanged += self.__onSettingsChanged self.battlePassController.onSeasonStateChange += self.__switchCarousels self._countdownController.onEventStateChanged += self.__updateTenYearsCountdownEntryPointVisibility self._countdownController.onEventBlockChanged += self.__updateTenYearsCountdownEntryPointVisibility self._countdownController.onBlocksDataValidityChanged += self.__updateTenYearsCountdownEntryPointVisibility self._hangarLoadingController.onHangarLoadedAfterLogin += self.__onHangarLoadedAfterLogin self.startGlobalListening() g_eventBus.addListener(AmmunitionSetupViewEvent.HINT_ZONE_ADD, self.__onHintZoneAdded, EVENT_BUS_SCOPE.LOBBY) g_eventBus.addListener(AmmunitionSetupViewEvent.HINT_ZONE_HIDE, self.__onHintZoneHide, EVENT_BUS_SCOPE.LOBBY) self.__updateAll() self.addListener(LobbySimpleEvent.WAITING_SHOWN, self.__onWaitingShown, EVENT_BUS_SCOPE.LOBBY) self.addListener(events.FightButtonEvent.FIGHT_BUTTON_UPDATE, self.__handleFightButtonUpdated, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.__handleSelectedEntityUpdated) self.statsCollector.noteHangarLoadingState(HANGAR_LOADING_STATE.HANGAR_UI_READY, showSummaryNow=True) lobbyContext = dependency.instance(ILobbyContext) isCrewBooksEnabled = lobbyContext.getServerSettings().isCrewBooksEnabled() getTutorialGlobalStorage().setValue(GLOBAL_FLAG.CREW_BOOKS_ENABLED, isCrewBooksEnabled) self.as_setNotificationEnabledS(crewBooksViewedCache().haveNewCrewBooks()) self.__updateSenorityEntryPoint() self.__updateTenYearsCountdownEntryPointVisibility() self._offersBannerController.showBanners()
def _populate(self): g_currentPreviewVehicle.selectVehicle(self._vehicleCD, self.__vehicleStrCD) LobbySelectableView._populate(self) g_clientUpdateManager.addMoneyCallback(self._updateBtnState) g_clientUpdateManager.addCallbacks( {'stats.freeXP': self._updateBtnState}) g_currentPreviewVehicle.onComponentInstalled += self.__updateStatus g_currentPreviewVehicle.onVehicleUnlocked += self._updateBtnState g_currentPreviewVehicle.onVehicleInventoryChanged += self.__onInventoryChanged g_currentPreviewVehicle.onChanged += self.__onVehicleChanged self.comparisonBasket.onChange += self.__onCompareBasketChanged self.comparisonBasket.onSwitchChange += self.__updateHeaderData self.restores.onRestoreChangeNotify += self.__onRestoreChanged self.hangarSpace.onSpaceCreate += self.__onHangarCreateOrRefresh self.hangarSpace.setVehicleSelectable(True) if g_currentPreviewVehicle.isPresent(): self.__fullUpdate() else: event_dispatcher.showHangar() self.addListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.handleSelectedEntityUpdated)