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)
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
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
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
def setDispatcher(self, dispatcher): TUTORIAL_SETTINGS.getClass( self._settings.gui).setDispatcher(dispatcher)
def setDispatcher(self, dispatcher): TUTORIAL_SETTINGS.getClass(self._settings.gui).setDispatcher(dispatcher)