コード例 #1
0
ファイル: battle.py プロジェクト: v3ss0n/WOTDecompiled
def _readHintSection(xmlCtx, section, _):
    hintID = sub_parsers._parseID(xmlCtx, section, 'Specify a hint ID')
    text = translation(_xml.readString(xmlCtx, section, 'text'))
    image = None
    if 'image' in section.keys():
        image = _xml.readString(xmlCtx, section, 'image')
    speakID = None
    if 'speak' in section.keys():
        speakID = _xml.readString(xmlCtx, section, 'speak')
    return chapter.SimpleHint(hintID, text, image=image, speakID=speakID)
コード例 #2
0
ファイル: battle.py プロジェクト: webiumsk/WOT-0.9.17-CT
def _readHintSection(xmlCtx, section, _):
    hintID = sub_parsers.parseID(xmlCtx, section, 'Specify a hint ID')
    text = translation(_xml.readString(xmlCtx, section, 'text'))
    if 'image' in section.keys():
        image = chapter.SimpleImagePath(None, _xml.readString(xmlCtx, section, 'image'))
    elif 'image-ref' in section.keys():
        image = _xml.readString(xmlCtx, section, 'image-ref')
    else:
        image = chapter.SimpleImagePath()
    speakID = None
    if 'wwspeak' in section.keys():
        speakID = _xml.readString(xmlCtx, section, 'wwspeak')
    return chapter.SimpleHint(hintID, text, image, speakID=speakID)