summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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]