示例#1
0
def getTutorialEventsDescriptor():
    try:
        from tutorial.doc_loader import getQuestsDescriptor
    except ImportError:
        LOG_ERROR('Can not load package tutorial')

        def getQuestsDescriptor():
            return None

    return getQuestsDescriptor()
示例#2
0
def getTutorialEventsDescriptor():
    try:
        from tutorial.doc_loader import getQuestsDescriptor
    except ImportError:
        LOG_ERROR('Can not load package tutorial')

        def getQuestsDescriptor():
            return None

    return getQuestsDescriptor()
示例#3
0
 def triggerEffect(self):
     chapterID = self._tutorial.getVars().get(self.getTargetID())
     descriptor = getQuestsDescriptor()
     completed = game_vars.getTutorialsCompleted()
     chapterIdx = descriptor.getChapterIdx(chapterID)
     chaptersCount = descriptor.getNumberOfChapters()
     nextChapterID = self.__getOpenedChapterID(
         descriptor, completed, chapterIdx,
         chaptersCount) or self.__getOpenedChapterID(
             descriptor, completed, 0, chapterIdx)
     events_dispatcher.showTutorialTabInEventsWindow(nextChapterID)
示例#4
0
 def invoke(self, content, varID):
     descriptor = getQuestsDescriptor()
     chapterID = self.getVar(varID)
     chapter = descriptor.getChapter(chapterID)
     value = content['description']
     content['description'] = self.getVar(value, default=value)
     content['header'] = self.__getAwardHeader(content, chapter)
     content['bgImage'] = self.__getAwardIcon(content, chapter)
     content['bonuses'] = chapter.getBonus().getValues()
     content['chapterID'] = chapterID
     content['showQuestsBtn'] = not descriptor.areAllBonusesReceived(self._bonuses.getCompleted())
示例#5
0
 def invoke(self, content, varID):
     descriptor = getQuestsDescriptor()
     chapterID = self.getVar(varID)
     chapter = descriptor.getChapter(chapterID)
     value = content['description']
     content['description'] = self.getVar(value, default=value)
     content['header'] = self.__getAwardHeader(content, chapter)
     content['bgImage'] = self.__getAwardIcon(content, chapter)
     content['bonuses'] = chapter.getBonus().getValues()
     content['chapterID'] = chapterID
     progrCondition = chapter.getProgressCondition()
     if progrCondition.getID() == 'vehicleBattlesCount':
         content['vehicle'] = progrCondition.getValues().get('vehicle')
     content['showQuestsBtn'] = not descriptor.areAllBonusesReceived(self._bonuses.getCompleted())