Example #1
0
 def _dispose(self):
     super(BCVehiclePreview, self)._dispose()
     g_bootcampEvents.onRequestChangeVehiclePreviewBuyButtonState -= self.__setBuyButtonState
     g_currentPreviewVehicle.onVehicleUnlocked -= self.__onVehicleUnlockedMessage
     g_currentPreviewVehicle.onVehicleInventoryChanged -= self.__onVehicleInventoryChanged
     from bootcamp.BootcampGarage import g_bootcampGarage
     g_bootcampGarage.closeAllPopUps()
def showPersonalCase(tankmanInvID, tabIndex, scope=EVENT_BUS_SCOPE.DEFAULT):
    """
    Show personalCase window on current tab.
    :param tankmanInvID: int-type tankman inventory ID.
    :param tabIndex: int-type tab index
    :param scope:
    """
    from bootcamp.BootcampGarage import g_bootcampGarage
    if constants.IS_BOOTCAMP_ENABLED:
        if g_bootcamp.isRunning():
            g_bootcampGarage.closeAllPopUps()
            g_eventBus.handleEvent(
                events.LoadViewEvent(
                    VIEW_ALIAS.BOOTCAMP_PERSONAL_CASE,
                    getViewName(VIEW_ALIAS.BOOTCAMP_PERSONAL_CASE,
                                tankmanInvID), {
                                    'tankmanID': tankmanInvID,
                                    'page': tabIndex
                                }), scope)
            return
    g_eventBus.handleEvent(
        events.LoadViewEvent(
            VIEW_ALIAS.PERSONAL_CASE,
            getViewName(VIEW_ALIAS.PERSONAL_CASE, tankmanInvID), {
                'tankmanID': tankmanInvID,
                'page': tabIndex
            }), scope)
Example #3
0
 def _populate(self):
     g_currentPreviewVehicle.selectVehicle(self.__vehicleCD)
     if g_currentPreviewVehicle.item.level in DISABLED_TANK_LEVELS:
         self._disableBuyButton = True
     super(BCVehiclePreview, self)._populate()
     g_bootcampEvents.onRequestChangeVehiclePreviewBuyButtonState += self.__setBuyButtonState
     from bootcamp.BootcampGarage import g_bootcampGarage
     nationData = g_bootcampGarage.getNationData()
     g_currentPreviewVehicle.onVehicleUnlocked += self.__onVehicleUnlockedMessage
     g_currentPreviewVehicle.onVehicleInventoryChanged += self.__onVehicleInventoryChanged
     foundHints = False
     if nationData['vehicle_second'] == self.__vehicleCD:
         foundHints = g_bootcampGarage.runViewAlias(self.alias)
     if not foundHints:
         g_bootcampGarage.closeAllPopUps()
         g_bootcampGarage.checkReturnToHangar()
Example #4
0
 def _dispose(self):
     self._listener.stopListen()
     super(BCResearch, self)._dispose()
     g_bootcampGarage.closeAllPopUps()
Example #5
0
 def _populate(self):
     super(BCResearch, self)._populate()
     g_bootcampGarage.closeAllPopUps()