diff options
Diffstat (limited to 'src/mapdata.py')
-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 |