summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-07-25 19:00:10 +0200
committerTreeki <treeki@gmail.com>2012-07-25 19:00:10 +0200
commitdcd8c9c20aa883d056862d0ba7c53fd7b06edc49 (patch)
tree03685c3a72348f68e5e43129caf03b9b3a9b9caf /src/mapdata.py
parent0e63ef0b2e2f062e5214f841239c3a483d45562a (diff)
parente0aebec63011cbcb676caa92948e25c62fd6c17b (diff)
downloadkoopatlas-dcd8c9c20aa883d056862d0ba7c53fd7b06edc49.tar.gz
koopatlas-dcd8c9c20aa883d056862d0ba7c53fd7b06edc49.zip
merging the new unlock system into master
Diffstat (limited to '')
-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: