コード例 #1
0
def _readSetFilterSection(xmlCtx, section, _, conditions):
    filterID = sub_parsers._parseID(xmlCtx, section, 'Specify a filter ID')
    value = []
    for name, subSec in _xml.getChildren(xmlCtx, section, 'value'):
        value.append(sub_parsers._readVarValue(name, subSec))

    return chapter.SetFilter(filterID, tuple(value), conditions=conditions)
コード例 #2
0
ファイル: lobby.py プロジェクト: 19colt87/WOTDecompiled
def _readSetFilterSection(xmlCtx, section, _, conditions):
    filterID = sub_parsers._parseID(xmlCtx, section, 'Specify a filter ID')
    value = []
    for name, subSec in _xml.getChildren(xmlCtx, section, 'value'):
        value.append(sub_parsers._readVarValue(name, subSec))

    return chapter.SetFilter(filterID, tuple(value), conditions=conditions)
コード例 #3
0
    def __readCommandsSection(self, xmlCtx, section):
        self.__commands.clear()
        for _, subSection in _xml.getChildren(xmlCtx, section, 'gui-commands'):
            commandID = sub_parsers._parseID(xmlCtx, subSection, 'Specify a command ID')
            cmdType = _xml.readString(xmlCtx, subSection, 'type')
            command = _xml.readString(xmlCtx, subSection, 'name')
            argsSec = _xml.getChildren(xmlCtx, subSection, 'args')
            args = []
            for name, argSec in argsSec:
                args.append(sub_parsers._readVarValue(name, argSec))

            self.__commands[commandID] = CommandData(cmdType, command, args)
コード例 #4
0
    def __readCommandsSection(self, xmlCtx, section):
        self.__commands.clear()
        for _, subSection in _xml.getChildren(xmlCtx, section, 'gui-commands'):
            commandID = sub_parsers._parseID(xmlCtx, subSection,
                                             'Specify a command ID')
            cmdType = _xml.readString(xmlCtx, subSection, 'type')
            command = _xml.readString(xmlCtx, subSection, 'name')
            argsSec = _xml.getChildren(xmlCtx, subSection, 'args')
            args = []
            for name, argSec in argsSec:
                args.append(sub_parsers._readVarValue(name, argSec))

            self.__commands[commandID] = CommandData(cmdType, command, args)