def _readExitQueueEffectSection(xmlCtx, section, flags, conditions): flagID = sub_parsers._parseID(xmlCtx, section, 'Specify a flag ID') if flagID not in flags: flags.append(flagID) return chapter.HasTargetEffect(flagID, chapter.Effect.EXIT_QUEUE, conditions=conditions)
def _readGlobalDeactivateEffectSection(xmlCtx, section, flags, conditions): flagID = _parseID(xmlCtx, section, 'Specify a flag ID') if flagID not in flags: flags.append(flagID) return chapter.HasTargetEffect(flagID, chapter.Effect.GLOBAL_DEACTIVATE, conditions=conditions)
def playTargetedEffect(targetID, effectType): instance = loader.g_loader.tutorial if instance and not instance._tutorialStopped: instance.storeEffectsInQueue( [chapter.HasTargetEffect(targetID, effectType)], benefit=True) else: LOG_DEBUG('Tutorial is not running.')
def _readShowMessageSection(xmlCtx, section, _, conditions): messageID = _parseID(xmlCtx, section, 'Specify a message ID') return chapter.HasTargetEffect(messageID, chapter.Effect.SHOW_MESSAGE, conditions=conditions)
def _readShowWindowSection(xmlCtx, section, _, conditions): windowID = _parseID(xmlCtx, section, 'Specify a window ID') return chapter.HasTargetEffect(windowID, chapter.Effect.SHOW_WINDOW, conditions=conditions)
def _readShowDialogSection(xmlCtx, section, _, conditions): dialogID = _parseID(xmlCtx, section, 'Specify a dialog ID') return chapter.HasTargetEffect(dialogID, chapter.Effect.SHOW_DIALOG, conditions=conditions)
def _readShowHintSection(xmlCtx, section, _, conditions): hintID = _parseID(xmlCtx, section, 'Specify a hint ID') return chapter.HasTargetEffect(hintID, chapter.Effect.SHOW_HINT, conditions=conditions)
def _readRequestBonusEffectSection(xmlCtx, section, _, conditions): chapterID = section.asString return chapter.HasTargetEffect(chapterID, chapter.Effect.REQUEST_BONUS, conditions=conditions)
def _readRunTriggerEffectSection(xmlCtx, section, _, conditions): triggerID = _parseID(xmlCtx, section, 'Specify a trigger ID') return chapter.HasTargetEffect(triggerID, chapter.Effect.RUN_TRIGGER, conditions=conditions)
def _readNextTaskSection(xmlCtx, section, _, conditions): taskID = sub_parsers._parseID(xmlCtx, section, 'Specify a next task ID') return chapter.HasTargetEffect(taskID, chapter.Effect.NEXT_TASK, conditions=conditions)
def _readGlobalActivateEffectSection(xmlCtx, section, flags, conditions): flagID = _parseID(xmlCtx, section, 'Specify a flag ID') return chapter.HasTargetEffect(flagID, chapter.Effect.GLOBAL_ACTIVATE, conditions=conditions)
def _readCloseHintSection(xmlCtx, section, _, conditions): hintID = sub_parsers._parseID(xmlCtx, section, 'Specify a hint ID') return chapter.HasTargetEffect(hintID, chapter.Effect.CLOSE_HINT, conditions=conditions)
def _readShowMarkerSection(xmlCtx, section, _, conditions): markerID = sub_parsers._parseID(xmlCtx, section, 'Specify a marker ID') return chapter.HasTargetEffect(markerID, chapter.Effect.SHOW_MARKER, conditions=conditions)
def _readShowGreetingSection(xmlCtx, section, _, conditions): greetingID = sub_parsers._parseID(xmlCtx, section, 'Specify a greeting ID') return chapter.HasTargetEffect(greetingID, chapter.Effect.SHOW_GREETING, conditions=conditions)
def _readTeleportSection(xmlCtx, section, _, conditions): pointID = sub_parsers._parseID(xmlCtx, section, 'Specify a point ID') return chapter.HasTargetEffect(pointID, chapter.Effect.TELEPORT, conditions=conditions)
def _readPlayMusicSection(xmlCtx, section, _, conditions): messageID = _parseID(xmlCtx, section, 'Specify a music ID') return chapter.HasTargetEffect(messageID, chapter.Effect.PLAY_MUSIC, conditions=conditions)
def _readInvokePlayerCmdSection(xmlCtx, section, _, conditions): commandID = _parseID(xmlCtx, section, 'Specify a command ID') return chapter.HasTargetEffect(commandID, chapter.Effect.INVOKE_PLAYER_CMD, conditions=conditions)
def _readNextChapterEffectSection(xmlCtx, section, _, conditions): targetID = section.asString return chapter.HasTargetEffect(targetID, chapter.Effect.NEXT_CHAPTER, conditions=conditions)