コード例 #1
0
ファイル: in_garage.py プロジェクト: kusaku/wot_scripts
def weave(weaver, stateInGarage):
    """ Activates all pointcuts which must be always active in bootcamp hangar.
    :param weaver: AOP weaver to use for scoping
    :param stateInGarage: instance of class bootcamp.states.StateInGarage
    """
    weaver.weave(pointcut=_PointcutBrowserControllerDisable)
    weaver.weave(pointcut=_PointcutPrbDisableEntitySelect)
    weaver.weave(pointcut=_PointcutPrbInvitationText)
    weaver.weave(pointcut=_PointcutPrbDisableAcceptButton)
    weaver.weave(pointcut=_PointcutSysMessagesClient, avoid=True)
    weaver.weave(pointcut=_PointcutSysMessagesServer, avoid=True)
    weaver.weave(pointcut=_PointcutUnreadMessages)
    weaver.weave(pointcut=_PointcutFriendRequest, avoid=True)
    weaver.weave(pointcut=_PointcutShowModuleInfo, avoid=True)
    from bootcamp.Bootcamp import g_bootcamp
    if not g_bootcamp.isResearchFreeLesson():
        weaver.weave(pointcut=_PointcutNoFittingPopover, avoid=True)
        weaver.weave(pointcut=_PointcutDisableModuleClickSound)
    if g_bootcamp.getLessonNum() == _SET_OPTIONAL_DEVICE_LESSON_NUM:
        weaver.weave(pointcut=_PointcutOnOptionalDeviceSelectPopoverDestroy)
        weaver.weave(pointcut=_PointcutOnOptionalDeviceSelectPopoverSetModule)
    weaver.weave(pointcut=_PointcutOnOptionalDeviceSelectPopoverGetTabData())
    weaver.weave(pointcut=_PointcutOnOptionalDeviceSelectPopoverGetInitialTabIndex())
    weaver.weave(pointcut=_PointcutOverrideAOGASMessageTimeout)
    if getClientLanguage() == 'ko':
        weaver.weave(pointcut=_PointcutOverrideKoreaParentalControl)
    weaver.weave(pointcut=_PointcutDisableRankedBattleEvents)
    weaver.weave(pointcut=_PointcutDisableNewYearEventAvailability)
    weaver.weave(pointcut=_PointcutDisableNewYearEvent)
    weaver.weave(pointcut=_PointcutDisableNewYearStateUpdating)
コード例 #2
0
ファイル: BCTechTree.py プロジェクト: kusaku/wot_scripts
 def goToNextVehicle(self, vehCD):
     if not g_bootcamp.isResearchFreeLesson():
         nationData = g_bootcampGarage.getNationData()
         if nationData['vehicle_second'] == vehCD:
             vehicle = self.itemsCache.items.getItemByCD(int(vehCD))
             if vehicle.isInInventory:
                 shared_events.showResearchView(vehCD)
                 return
         if nationData['vehicle_first'] == vehCD:
             shared_events.showResearchView(vehCD)
     else:
         shared_events.showResearchView(vehCD)
コード例 #3
0
 def goToNextVehicle(self, vehCD):
     if not g_bootcamp.isResearchFreeLesson():
         nationData = g_bootcamp.getNationData()
         vehicle = self._itemsCache.items.getItemByCD(int(vehCD))
         exitEvent = events.LoadViewEvent(VIEW_ALIAS.LOBBY_TECHTREE, ctx={'nation': vehicle.nationName})
         if nationData['vehicle_second'] == vehCD:
             if vehicle.isInInventory:
                 shared_events.showResearchView(vehCD, exitEvent=exitEvent)
                 return
         if nationData['vehicle_first'] == vehCD:
             shared_events.showResearchView(vehCD, exitEvent=exitEvent)
     else:
         shared_events.showResearchView(vehCD)
コード例 #4
0
def weave(weaver, stateInGarage):
    weaver.weave(pointcut=_PointcutPrbDisableEntitySelect)
    weaver.weave(pointcut=_PointcutPrbInvitationText)
    weaver.weave(pointcut=_PointcutPrbDisableAcceptButton)
    weaver.weave(pointcut=_PointcutSysMessagesClient, avoid=True)
    weaver.weave(pointcut=_PointcutSysMessagesServer, avoid=True)
    weaver.weave(pointcut=_PointcutUnreadMessages)
    weaver.weave(pointcut=_PointcutFriendRequest, avoid=True)
    weaver.weave(pointcut=_PointcutShowModuleInfo, avoid=True)
    from bootcamp.Bootcamp import g_bootcamp
    if not g_bootcamp.isResearchFreeLesson():
        weaver.weave(pointcut=_PointcutNoFittingPopover, avoid=True)
        weaver.weave(pointcut=_PointcutDisableModuleClickSound)
    weaver.weave(pointcut=_PointcutOnOptionalDeviceSelectPopoverGetTabData)
    weaver.weave(
        pointcut=_PointcutOnOptionalDeviceSelectPopoverGetInitialTabIndex)
    weaver.weave(
        pointcut=_PointcutOnOptionalDeviceSelectPopoverPreventCloseAfterMessage
    )
    weaver.weave(pointcut=_PointcutOverrideAOGASMessageTimeout)
    if getClientLanguage() == 'ko':
        weaver.weave(pointcut=_PointcutOverrideKoreaParentalControl)
    weaver.weave(pointcut=_PointcutDisableRankedBattleEvents)
コード例 #5
0
 def requestShowPopover(self, alias, data):
     if IS_BOOTCAMP_ENABLED:
         from bootcamp.Bootcamp import g_bootcamp
         if g_bootcamp.isRunning():
             if data is not None and hasattr(data, 'slotType') and data.slotType != 'optionalDevice' and not g_bootcamp.isResearchFreeLesson():
                 return
             if data is None and alias != 'bootcampBattleTypeSelectPopover':
                 return
     event = g_entitiesFactories.makeShowPopoverEvent(alias, {'data': data})
     if event is not None:
         self.fireEvent(event, scope=self.__scope)
     else:
         LOG_ERROR('Event of opening popover can not be created', alias)
     return