diff options
Diffstat (limited to 'src/mapdata.py')
-rw-r--r-- | src/mapdata.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index 0866815..5f92968 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -170,6 +170,9 @@ class KPNode(object): self.exits = [] self.level = [0,0] self.isStop = False + self.mapChange = None + self.transition = 0 + self.mapID = None class KPPath(object): @@ -368,8 +371,7 @@ class KPMap(object): def loadTilesets(self): - import os - from hashlib import sha256 as sha + import os, hashlib path = os.getcwd() + os.sep + 'Tilesets' @@ -385,21 +387,21 @@ class KPMap(object): filehandler = open(filepath) data = filehandler.read() filehandler.close() - hash = sha(data).hexdigest() + hash = hashlib.sha256(data).hexdigest() self.tilesets[name] = {'path': filepath, 'hash': hash} self.loadedTilesets[name] = KPTileset.loadFromArc(filepath) def reloadTileset(self, name): - from hashlib import sha256 as sha + from hashlib import info = self.tilesets[name] filehandler = open(info['path']) data = filehandler.read() filehandler.close() - hash = sha(data).hexdigest() + hash = hashlib.sha256(data).hexdigest() if info['hash'] != hash: self.loadedTilesets[name] = KPTileset.loadFromArc(info['path']) |