summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapdata.py')
-rw-r--r--src/mapdata.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mapdata.py b/src/mapdata.py
index c32bd7b..d175046 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -451,7 +451,7 @@ class KPNode(object):
@mapfile.dumpable('path')
class KPPath(object):
- __dump_attribs__ = ('unlocks', 'secret', 'animation', 'movementSpeed')
+ __dump_attribs__ = ('unlockSpec', 'animation', 'movementSpeed')
def _dump(self, mapObj, dest):
dest['startNodeLink'] = mapObj.refNode(self._startNodeRef())
@@ -464,6 +464,10 @@ class KPPath(object):
# self.linkedLayer = mapObj.derefLayer(src['linkedLayer'])
def __init__(self, startNode=None, endNode=None, cloneFrom=None):
+ # this is placed before the null ctor in case we load an old
+ # kpmap that didn't have unlockSpec
+ self.unlockSpec = None # always unlocked, by default
+
if startNode is None and endNode is None:
# null ctor, ignore this
# we're probably loaded from a file, so trust
@@ -476,9 +480,6 @@ class KPPath(object):
startNode.exits.append(self)
endNode.exits.append(self)
- self.unlocks = 0 # 0 = always unlocked, 1 = unlocked from startNode, 2 = unlocked from endNode
- self.secret = 0 # 0 = unlocks from normal exit, 1 = unlocks from secret exit
-
if cloneFrom is None:
self.animation = 0
else: