Advertisement
Brainsucker

Untitled

May 26th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import es
  2. import path
  3.  
  4. class DownloadHandler:
  5.     downloads = []
  6.    
  7.     @staticmethod
  8.     def downloadAll(self):
  9.         for d in self.downloads:
  10.             d.addDownload()
  11.  
  12. class DownloadPath(path.path):
  13.    
  14.     def __init__(self, other):
  15.         path.path.__init__(self, other)
  16.        
  17.         DownloadHandler.downloads.append(self)
  18.        
  19.     def addDownload(self):
  20.         for f in self.files():
  21.             es.stringtable('downloadables', str(f))
  22.            
  23.            
  24. # Bitte in diesem Bereich alle deine Pfade angeben, die heruntergeladen werden sollen.
  25.  
  26. DownloadPath('maps')
  27. DownloadPath('sound/ordner/und/so/weiter')
  28. # DownloadPath('')
  29.  
  30.  
  31. # Nichts Editieren!
  32.          
  33. def es_map_start(ev):
  34.     DownloadHandler.downloadAll()
  35.    
  36. def load():
  37.     DownloadHandler.downloadAll()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement