home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- InitTakeDictionary = { }
-
- def AddOnInitTakeEvent(objname, funct, flag = 0):
- InitTakeDictionary[objname] = [
- funct,
- flag]
-
-
- def DelOnInitTakeEvent(objname):
- if InitTakeDictionary.has_key(objname):
- del InitTakeDictionary[objname]
-
-
-
- def OnInitTakeFunc(objname):
- if InitTakeDictionary.has_key(objname):
- InitTakeDictionary[objname][0]()
- return InitTakeDictionary[objname][1]
-
-
-
- def SaveData(filename):
- import cPickle
- funcfile = open(filename, 'wt')
- p = cPickle.Pickler(funcfile)
- d = (InitTakeDictionary,)
- p.dump(d)
- funcfile.close()
-
-
- def LoadData(filename):
- global InitTakeDictionary
- import cPickle
- funcfile = open(filename, 'rt')
- p = cPickle.Unpickler(funcfile)
- d = p.load()
- funcfile.close()
- print d
- InitTakeDictionary = d[0]
-
- import GameState
- GameState.ModulesToBeSaved.append(__import__(__name__))
-