diff options
author | Treeki <treeki@gmail.com> | 2011-11-09 05:48:51 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-09 05:48:51 +0100 |
commit | 02a1d81d760525f515337d2109feba8887aa5edb (patch) | |
tree | 8e0fbf75554e5be33438df83d926f1acb1091228 /src/mapdata.py | |
parent | 8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f (diff) | |
download | koopatlas-02a1d81d760525f515337d2109feba8887aa5edb.tar.gz koopatlas-02a1d81d760525f515337d2109feba8887aa5edb.zip |
a bunch of incomplete stuff
Diffstat (limited to '')
-rw-r--r-- | src/mapdata.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index 550d710..d4eb2eb 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -123,6 +123,11 @@ class KPMap(object): self.paths = [] self.doodads = [] self.tilesets = {} + self.loadedTilesets = {} + + # TESTING CRAP + self.tilesets['Test'] = {'path': '/home/me/Dropbox/NEWERsmbw/Test2.arc'} + self.reloadTileset('Test') # LAYERS @@ -224,4 +229,12 @@ class KPMap(object): self.layerModel.beginRemoveRows(QtCore.QModelIndex(), index, index) del self.layers[index] self.layerModel.endRemoveRows() + + + def reloadTileset(self, name): + info = self.tilesets[name] + self.loadedTilesets[name] = KPTileset.loadFromArc(info['path']) + # TODO: handle relative paths properly in relation to the map file + # TODO: add some sort of callback/signal to regenerate objects/layers + # and refresh the view |