summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mapdata.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mapdata.py b/src/mapdata.py
index b453172..2a19da6 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -1,7 +1,7 @@
class KPLayer(object):
def __init__(self):
+ self.name = ''
self.tileset = ''
- self.size = (0,0)
self.objects = []
@@ -39,10 +39,16 @@ class KPDoodad(object):
class KPMap(object):
def __init__(self):
- self.layers = []
+ self.nextLayerNumber = 1
+
+ self.layers = [self.createNewLayer() for x in range(4)]
self.nodes = []
self.paths = []
self.doodads = []
- self.nextLayerNumber = 1
+ def createNewLayer(self):
+ layer = KPLayer()
+ layer.name = "Layer %d" % self.nextLayerNumber
+ self.nextLayerNumber += 1
+ return layer