summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-02-17 20:25:37 +0100
committerTreeki <treeki@gmail.com>2012-02-17 20:25:37 +0100
commit5db723084547343dde7c8a0e11f2ca1f7c7149f2 (patch)
treec1cee9f18a985142e7e95400564bef2ef11d3b39
parent08d3794ee696231961b1e74e52d08d0e52b37566 (diff)
downloadkoopatlas-5db723084547343dde7c8a0e11f2ca1f7c7149f2.tar.gz
koopatlas-5db723084547343dde7c8a0e11f2ca1f7c7149f2.zip
disabled reloadTileset until it gets fixed
-rw-r--r--src/mapdata.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mapdata.py b/src/mapdata.py
index 0025550..2bdc4eb 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -747,12 +747,23 @@ class KPMap(object):
data = filehandler.read()
filehandler.close()
hash = sha(data).hexdigest()
+
+ # this is a bit messy
+ try:
+ old_info = self.tilesets[name]
+ if old_info['hash'] == hash:
+ continue
+ except KeyError:
+ pass
self.tilesets[name] = {'path': filepath, 'hash': hash}
self.loadedTilesets[name] = KPTileset.loadFromArc(filepath)
def reloadTileset(self, name):
+ # TODO: Re-enable this when it's fixed.
+ return
+
from hashlib import sha256 as sha
info = self.tilesets[name]