summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-11-30 19:45:31 -0600
committerColin Noga <Tempus@Spectrum-Song.local>2011-11-30 19:45:31 -0600
commit9ee60f4da447ed60a5221aeed366ae7fd6b85e49 (patch)
treef4cf10fc7b17666a3719362211215e4b092fd39a /src/mapdata.py
parent717ac311420ecb3acea2a31214a79ab4411d0b6c (diff)
downloadkoopatlas-9ee60f4da447ed60a5221aeed366ae7fd6b85e49.tar.gz
koopatlas-9ee60f4da447ed60a5221aeed366ae7fd6b85e49.zip
Added the start of exit system, still needs refinement
Diffstat (limited to '')
-rw-r--r--src/mapdata.py12
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'])