def __init__(self,directories,tileFunctionLoader): Loader.__init__(self) ''' Tile loader for load the good tile ''' self.tileFunctionLoader = tileFunctionLoader splitter = re.compile(r'(\s+|\S+)') self.directories = splitter.findall(directories) self.data = {}
def __init__(self, directories, itemLoader): Loader.__init__(self) ''' character loader for load the good item ''' self.itemsLoader = itemLoader splitter = re.compile(r'(\s+|\S+)') self.directories = splitter.findall(directories) self.data = {}
def __init__(self,directories,itemLoader): Loader.__init__(self) ''' character loader for load the good item ''' self.itemsLoader = itemLoader splitter = re.compile(r'(\s+|\S+)') self.directories = splitter.findall(directories) self.data = {}
def loadFiles(self,directory, filesList): for file in filesList: self.log.debug(file) parser = Loader.loadParserForFile(self,'event',directory+'/'+file) if parser != None: self.data.append(parser.loadInClass(Event()))
def loadFiles(self,directory, filesList): for file in filesList: self.log.debug(file) parser = Loader.loadParserForFile(self,'tilefunction',directory+'/'+file) if parser != None: self.data.append(parser.loadInClass(TileFunction()))
def loadFiles(self,directory, filesList): for file in filesList: self.log.debug('FILE:'+file) parser = Loader.loadParserForFile(self,'item',directory+os.sep+file) if parser != None: self.data.append(parser.loadInClass(Item()))
def loadFiles(self, directory, filesList): for file in filesList: self.log.debug(file) parser = Loader.loadParserForFile(self, 'tilefunction', directory + '/' + file) if parser != None: self.data.append(parser.loadInClass(TileFunction()))
def loadFiles(self, directory, filesList): for file in filesList: self.log.debug(file) parser = Loader.loadParserForFile(self, 'event', directory + '/' + file) if parser != None: self.data.append(parser.loadInClass(Event()))
def loadFiles(self, directory, filesList): for file in filesList: self.log.debug('FILE:' + file) parser = Loader.loadParserForFile(self, 'item', directory + os.sep + file) if parser != None: self.data.append(parser.loadInClass(Item()))
def loadFiles(self,directory, filesList): for file in filesList: self.log.debug(file) if(os.path.isdir(directory+'/'+file) == False and os.access(directory+'/'+file, os.F_OK)): parser = Loader.loadParserForFile(self,'zone',directory+'/'+file) if parser != None: zone = Zone(self.tileFunctionLoader) zone = parser.loadInClass(zone) if not zone.subType in self.data: self.data[zone.subType] = [] self.data[zone.subType].append(zone) self.log.info('Zone "'+ zone.name + '" Done')
def loadFiles(self,directory, filesList): for file in filesList: self.log.debug(file) if(os.path.isdir(directory+os.sep+file) == False and os.access(directory+os.sep+file, os.F_OK)): parser = Loader.loadParserForFile(self,'character',directory+os.sep+file) if parser != None: character = Character(self.itemsLoader) character = parser.loadInClass(character) if character._type == character.TYPE_HERO: self.log.debug('Change class to Hero') character.__class__ = Hero elif character._type == character.TYPE_MONSTER: self.log.debug('Change class to Monster') character.__class__ = Monster if not character._name in self.data: self.data[character._name] = [] self.data[character._name].append(character) self.log.info('character "'+ character._name + '" Done')
def loadFiles(self, directory, filesList): for file in filesList: self.log.debug(file) if (os.path.isdir(directory + os.sep + file) == False and os.access(directory + os.sep + file, os.F_OK)): parser = Loader.loadParserForFile(self, 'character', directory + os.sep + file) if parser != None: character = Character(self.itemsLoader) character = parser.loadInClass(character) if character._type == character.TYPE_HERO: self.log.debug('Change class to Hero') character.__class__ = Hero elif character._type == character.TYPE_MONSTER: self.log.debug('Change class to Monster') character.__class__ = Monster if not character._name in self.data: self.data[character._name] = [] self.data[character._name].append(character) self.log.info('character "' + character._name + '" Done')
def __init__(self, directories): Loader.__init__(self) splitter = re.compile(r'(\s+|\S+)') self.directories = splitter.findall(directories) self.data = [] pass
def __init__(self,directories): Loader.__init__(self) splitter = re.compile(r'(\s+|\S+)') self.directories = splitter.findall(directories) self.data = [] pass