Ejemplo n.º 1
0
 def _dispose(self):
     super(BCFittingPopover, self)._dispose()
     if self.__slotType == 'optionalDevice':
         if self.__moduleInstalled:
             g_bootcampGarage.runCustomAction('showElementsLessonV_Step1')
         else:
             g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 2
0
 def _dispose(self):
     super(BCPersonalCase, self)._dispose()
     g_bootcampGarage.runViewAlias('hangar')
     observer = self.app.bootcampManager.getObserver(
         'BCPersonalCaseObserver')
     if observer:
         observer.onSkillClickEvent -= self.onSkillClick
 def onDropDownOpen(self, index):
     if not self.__isSelected:
         component = g_bootcampHintsConfig.objects[
             'ServiceSlotRepairOption']
         component['path'] = 'eqItem{0}.select:id=asInt'.format(index + 1)
         LOG_DEBUG('BCTechnicalMaintenance.onDropDownOpen', index)
         g_bootcampGarage.runViewAlias('bootcampTechnicalMaintenance_Popup')
Ejemplo n.º 4
0
 def _populate(self):
     super(BCQuestsWindow, self)._populate()
     bonuses = g_bootcamp.getBonuses()['battle'][g_bootcamp.getLessonNum()]
     bonuses['premium_text'] = self.getPremiumTimeString(
         bonuses.get('premium', 0) * 3600)
     self.as_setDataS(bonuses)
     g_bootcampGarage.runViewAlias('hangar')
 def fillVehicle(self, needRepair, needAmmo, needEquipment, isPopulate,
                 isUnload, isOrderChanged, shells, equipment):
     super(BCTechnicalMaintenance,
           self).fillVehicle(needRepair, needAmmo, needEquipment,
                             isPopulate, isUnload, isOrderChanged, shells,
                             equipment)
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 6
0
 def _populate(self):
     LOG_DEBUG('BCPersonalCase._populate')
     super(BCPersonalCase, self)._populate()
     observer = self.app.bootcampManager.getObserver(
         'BCPersonalCaseObserver')
     if observer:
         observer.onSkillClickEvent += self.onSkillClick
     if self.checkRole():
         g_bootcampGarage.runViewAlias('bootcampPresonalCase')
Ejemplo n.º 7
0
 def onAnimationsComplete(self):
     if not self.__animationInProgress:
         return
     else:
         from bootcamp.BootcampGarage import g_bootcampGarage
         g_bootcampGarage.resumeLesson()
         g_bootcampGarage.runViewAlias('hangar')
         if self.onAnimationsCompleteCallback is not None:
             self.onAnimationsCompleteCallback()
             self.onAnimationsCompleteCallback = None
         self.__animationInProgress = False
         return
Ejemplo n.º 8
0
 def atCall(self, cd):
     manager = cd.self.app.containerManager
     container = manager.getContainer(ViewTypes.WINDOW)
     window = None
     if container:
         window = container.getView(criteria={POP_UP_CRITERIA.VIEW_ALIAS: VIEW_ALIAS.BOOTCAMP_MESSAGE_WINDOW})
     if window:
         cd.avoid()
     else:
         from bootcamp.BootcampGarage import g_bootcampGarage
         g_bootcampGarage.runViewAlias('hangar')
     return
Ejemplo n.º 9
0
 def _dispose(self):
     observer = self.app.bootcampManager.getObserver(
         'BCTechnicalMaintenanceObserver')
     if observer is not None:
         observer.onDropDownOpenEvent -= self.onDropDownOpen
         observer.onDropDownCloseEvent -= self.onDropDownClose
         observer.onSlotSelectedEvent -= self.onSlotSelected
     g_bootcampEvents.onRequestCloseTechnicalMaintenance -= self.destroy
     g_bootcampGarage.onViewClosed(self.settings.alias)
     g_bootcampGarage.onViewClosed('technicalMaintenance_Popup')
     g_bootcampGarage.onViewClosed('technicalMaintenance_Slot')
     g_bootcampGarage.onViewClosed('technicalMaintenance_Done')
     super(BCTechnicalMaintenance, self)._dispose()
     g_bootcampGarage.runViewAlias('hangar')
     return
Ejemplo n.º 10
0
 def _populate(self):
     super(BCQuestsView, self)._populate()
     bonuses = g_bootcamp.getBonuses()['battle'][g_bootcamp.getLessonNum()]
     timeKey, time = getTimeLeftInfo(bonuses.get('premium', 0) * 3600)
     voData = {
         'premiumText':
         time + ' ' +
         makeString('#menu:header/account/premium/%s' % timeKey),
         'goldText':
         str(bonuses['gold']),
         'showRewards':
         bonuses['showRewards'],
         'goldIcon':
         RES_ICONS.MAPS_ICONS_BOOTCAMP_REWARDS_BCGOLD,
         'premiumIcon':
         RES_ICONS.MAPS_ICONS_BOOTCAMP_REWARDS_BCPREMIUM3D
     }
     self.as_setDataS(voData)
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 11
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
     g_currentPreviewVehicle.onVehicleUnlocked += self.__onVehicleUnlockedMessage
     g_currentPreviewVehicle.onVehicleInventoryChanged += self.__onVehicleInventoryChanged
     foundHints = False
     if self.__isSecondVehicle():
         foundHints = g_bootcampGarage.runViewAlias(self.alias)
     if not foundHints:
         g_bootcampGarage.checkReturnToHangar()
     g_bootcampEvents.onEnterPreview()
Ejemplo n.º 12
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()
 def _dispose(self):
     super(BCTechnicalMaintenance, self)._dispose()
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 14
0
 def _dispose(self):
     super(BCBattleSelector, self)._dispose()
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 15
0
 def _populate(self):
     super(BCFittingPopover, self)._populate()
     if self.__slotType == 'optionalDevice':
         g_bootcampGarage.runViewAlias(
             'bootcampFittingSelectPopoverMessage')
 def onSlotSelected(self, slotId, index):
     if not self.__isSelected:
         self.__isSelected = True
         g_bootcampGarage.runViewAlias('bootcampTechnicalMaintenance_Done')
Ejemplo n.º 17
0
 def onCloseClicked(self):
     self.destroy()
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 18
0
 def onWindowClose(self):
     super(BCVehicleBuyWindow, self).onWindowClose()
     g_bootcampGarage.runViewAlias('vehiclePreview')
Ejemplo n.º 19
0
 def _dispose(self):
     super(BCPersonalCase, self)._dispose()
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 20
0
 def onDropDownClosed(self, slotIndex):
     if slotIndex == 0 and not self.__ignoreNextDropDownClose:
         from bootcamp.BootcampGarage import g_bootcampGarage
         g_bootcampGarage.runViewAlias('hangar')
     self.__ignoreNextDropDownClose = False
Ejemplo n.º 21
0
 def onTankmanClick(self, slotIndex):
     self.__lastClickedSlotIndex = slotIndex
     if slotIndex == 0:
         from bootcamp.BootcampGarage import g_bootcampGarage
         g_bootcampGarage.runViewAlias('bootcampCrewList')
     self.__ignoreNextDropDownClose = False
Ejemplo n.º 22
0
 def _dispose(self):
     super(BCBattleSelector, self)._dispose()
     from bootcamp.BootcampGarage import g_bootcampGarage
     g_bootcampGarage.runViewAlias('hangar')
Ejemplo n.º 23
0
 def onCloseClicked(self):
     self.destroy()
     from bootcamp.BootcampGarage import g_bootcampGarage
     g_bootcampGarage.runViewAlias('hangar')
 def onDropDownClose(self, index):
     LOG_DEBUG('BCTechnicalMaintenance.onDropDownClose', index)
     if not self.__isSelected:
         g_bootcampGarage.runViewAlias('bootcampTechnicalMaintenance_Slot')
Ejemplo n.º 25
0
 def onDropDownClose(self, _):
     if not self.__isSelected:
         g_bootcampGarage.runViewAlias('technicalMaintenance_Slot')
Ejemplo n.º 26
0
 def _populate(self):
     LOG_DEBUG('BCPersonalCase._populate')
     super(BCPersonalCase, self)._populate()
     if self.checkRole():
         g_bootcampGarage.runViewAlias('bootcampPresonalCase')
Ejemplo n.º 27
0
 def onSlotSelected(self, _, __):
     if not self.__isSelected:
         self.__isSelected = True
         g_bootcampGarage.runViewAlias('technicalMaintenance_Done')