def __readControlsSounds(self, xmlCtx): """ Reading controls sounds data @param xmlCtx: [xml data section] xml context document """ controlsSection = _xml.getSubsection(xmlCtx, xmlCtx, self.CONTROLS) self.__default = doc_loaders.readDict(xmlCtx, controlsSection, self.CONTROLS_DEFAULT) controlsOverridesSection = _xml.getSubsection(xmlCtx, controlsSection, self.CONTROLS_OVERRIDES) for name in controlsOverridesSection.keys(): self.__overrides[name] = doc_loaders.readDict( xmlCtx, controlsOverridesSection, name) for schemaName, schemaSection in _xml.getChildren( xmlCtx, controlsSection, self.CONTROLS_SCHEMAS): self.__schemas[schemaName] = doc_loaders.readDict( xmlCtx, schemaSection, self.SCHEMA_SOUNDS) for groupName in _xml.getSubsection( xmlCtx, schemaSection, self.SCHEMA_GROUPS).asString.split(): if groupName in self.__groups: LOG_WARNING( 'Group has already been read. Will be overriden', groupName, schemaName) self.__groups[groupName] = schemaName
def __readControlsSounds(self, xmlCtx): """ Reading controls sounds data @param xmlCtx: [xml data section] xml context document """ controlsSection = _xml.getSubsection(xmlCtx, xmlCtx, self.CONTROLS) self.__default = doc_loaders.readDict(xmlCtx, controlsSection, self.CONTROLS_DEFAULT) controlsOverridesSection = _xml.getSubsection(xmlCtx, controlsSection, self.CONTROLS_OVERRIDES) for name in controlsOverridesSection.keys(): self.__overrides[name] = doc_loaders.readDict(xmlCtx, controlsOverridesSection, name) for schemaName, schemaSection in _xml.getChildren(xmlCtx, controlsSection, self.CONTROLS_SCHEMAS): self.__schemas[schemaName] = doc_loaders.readDict(xmlCtx, schemaSection, self.SCHEMA_SOUNDS) for groupName in _xml.getSubsection(xmlCtx, schemaSection, self.SCHEMA_GROUPS).asString.split(): if groupName in self.__groups: LOG_WARNING('Group has already been read. Will be overriden', groupName, schemaName) self.__groups[groupName] = schemaName
def __readEffectsSounds(self, xmlCtx): self.__effects = doc_loaders.readDict(xmlCtx, xmlCtx, self.EFFECTS)
def __readEffectsSounds(self, xmlCtx): """ Reading effects sounds data @param xmlCtx: [xml data section] xml context document """ self.__effects = doc_loaders.readDict(xmlCtx, xmlCtx, self.EFFECTS)