예제 #1
0
 def refuse(self):
     title = self._data.getTitle()
     description = self._data.getDescription(afterBattle=self._cache.isAfterBattle())
     self._cache.setRefused(True).write()
     level = self._cache.getPlayerXPLevel()
     self.stop(reason=TUTORIAL_STOP_REASON.PLAYER_ACTION)
     dispatcher = TUTORIAL_SETTINGS.getClass(self._settings.gui).getDispatcher()
     if dispatcher is not None:
         dispatcher.setPlayerXPLevel(level)
         dispatcher.setTrainingRestartMode()
         dispatcher.setChapterInfo(title, description)
예제 #2
0
 def refuse(self):
     title = self._data.getTitle()
     description = self._data.getDescription(
         afterBattle=self._cache.isAfterBattle())
     self._cache.setRefused(True).write()
     level = self._cache.getPlayerXPLevel()
     self.stop()
     dispatcher = TUTORIAL_SETTINGS.getClass(
         self._settings.gui).getDispatcher()
     if dispatcher is not None:
         dispatcher.setPlayerXPLevel(level)
         dispatcher.setTrainingRestartMode()
         dispatcher.setChapterInfo(title, description)
     return
예제 #3
0
 def pause(self, ctx):
     self._cache = ctx.cache
     if self._cache is None:
         LOG_ERROR('Cache is not init.')
         return
     self._bonuses = self._ctrlFactory.createBonuses(ctx.bonusCompleted)
     if self.__resolveInitialChapter():
         chapter = self._descriptor.getChapter(self._currentChapter)
         dispatcher = TUTORIAL_SETTINGS.getClass(self._settings.gui).getDispatcher()
         if dispatcher is not None:
             dispatcher.setPlayerXPLevel(self._cache.getPlayerXPLevel())
             dispatcher.setTrainingRestartMode()
             dispatcher.setChapterInfo(chapter.getTitle(), chapter.getDescription(afterBattle=self._cache.isAfterBattle()))
     self._cache = None
예제 #4
0
 def pause(self, ctx):
     self._cache = ctx.cache
     if self._cache is None:
         LOG_ERROR('Cache is not init.')
         return
     else:
         self._bonuses = self._ctrlFactory.createBonuses(ctx.bonusCompleted)
         if self.__resolveInitialChapter(ctx):
             chapter = self._descriptor.getChapter(self._currentChapter)
             dispatcher = TUTORIAL_SETTINGS.getClass(
                 self._settings.gui).getDispatcher()
             if dispatcher is not None:
                 dispatcher.setPlayerXPLevel(self._cache.getPlayerXPLevel())
                 dispatcher.setTrainingRestartMode()
                 dispatcher.setChapterInfo(
                     chapter.getTitle(),
                     chapter.getDescription(
                         afterBattle=self._cache.isAfterBattle()))
         self._cache = None
         return
예제 #5
0
 def setDispatcher(self, dispatcher):
     TUTORIAL_SETTINGS.getClass(
         self._settings.gui).setDispatcher(dispatcher)
예제 #6
0
파일: __init__.py 프로젝트: webiumsk/WoT
 def setDispatcher(self, dispatcher):
     TUTORIAL_SETTINGS.getClass(self._settings.gui).setDispatcher(dispatcher)