summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mapdata.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/mapdata.py b/src/mapdata.py
index 64a8f44..3c60e53 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -160,6 +160,25 @@ class KPPath(object):
self.segments = []
+class KPPathLayer(KPLayer):
+ def __repr__(self):
+ return "<KPPathLayer %r>" % self.name
+
+ def __init__(self):
+ KPLayer.__init__(self)
+ self.nodes = []
+ self.paths = []
+
+ def _visibilityChanged(self, value):
+ for obj in self.objects:
+ item = obj.qtItem
+ if item:
+ item.setVisible(value)
+
+
+
+
+
class KPMap(object):
def __init__(self):
self.nextLayerNumber = 1
@@ -236,14 +255,14 @@ class KPMap(object):
def createNewTileLayer(self, tilesetName):
layer = KPTileLayer()
- layer.name = "Layer %d" % self.nextLayerNumber
+ layer.name = "Tilemap - Layer %d" % self.nextLayerNumber
self.nextLayerNumber += 1
layer.tileset = tilesetName
return layer
def createNewDoodadLayer(self):
layer = KPDoodadLayer()
- layer.name = "Layer %d" % self.nextLayerNumber
+ layer.name = "Doodads - Layer %d" % self.nextLayerNumber
self.nextLayerNumber += 1
return layer