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)
            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()))
Beispiel #6
0
    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()))
Beispiel #7
0
 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')
Beispiel #9
0
    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')