def _readProgressSection(xmlCtx, section, _): progressID = sub_parsers.parseID(xmlCtx, section, 'Specify a progress ID') conditions = [] for _, subSec in _xml.getChildren(xmlCtx, section, 'steps'): conditions.append( chapter.HasIDConditions( sub_parsers.parseID(xmlCtx, subSec, 'Specify a condition ID'), sub_parsers.readConditions(xmlCtx, subSec, []))) return chapter.ChapterProgress(progressID, conditions)
def _readCheckpointSection(xmlCtx, section, flags): checkpointID = sub_parsers.parseID(xmlCtx, section, 'missing checkpoint ID') checkpointConditions = sub_parsers.readConditions( xmlCtx, _xml.getSubsection(xmlCtx, section, 'condition'), flags) checkpointEffects = [ effect for effect in ( sub_parsers._parseEffect(xmlCtx, effectSec, flags) for _, effectSec in _xml.getChildren(xmlCtx, section, 'effects')) if effect is not None ] return Checkpoint(checkpointID, checkpointConditions, checkpointEffects)
def _readProgressSection(xmlCtx, section, _): progressID = sub_parsers.parseID(xmlCtx, section, 'Specify a progress ID') conditions = [] for _, subSec in _xml.getChildren(xmlCtx, section, 'steps'): conditions.append(chapter.HasIDConditions(sub_parsers.parseID(xmlCtx, subSec, 'Specify a condition ID'), sub_parsers.readConditions(xmlCtx, subSec, []))) return chapter.ChapterProgress(progressID, conditions)