From faaa82bd81f24fc897a5d0ae912381413625ddeb Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 25 Jul 2012 00:36:42 +0200 Subject: moving to desktop --- src/mapdata.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mapdata.py') diff --git a/src/mapdata.py b/src/mapdata.py index c32bd7b..0332280 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()) @@ -476,8 +476,7 @@ 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 + self.unlockSpec = None # always unlocked, by default if cloneFrom is None: self.animation = 0 -- cgit v1.2.3 From e0aebec63011cbcb676caa92948e25c62fd6c17b Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 25 Jul 2012 14:11:19 +0200 Subject: exporting of unlockable paths done --- src/mapdata.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mapdata.py') diff --git a/src/mapdata.py b/src/mapdata.py index 0332280..d175046 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -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,8 +480,6 @@ class KPPath(object): startNode.exits.append(self) endNode.exits.append(self) - self.unlockSpec = None # always unlocked, by default - if cloneFrom is None: self.animation = 0 else: -- cgit v1.2.3