From 9ee60f4da447ed60a5221aeed366ae7fd6b85e49 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Wed, 30 Nov 2011 19:45:31 -0600 Subject: Added the start of exit system, still needs refinement --- src/mapdata.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/mapdata.py') 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']) -- cgit v1.2.3