# HG changeset patch # User vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1283647286 0 # Node ID 6856cdb22351550c1d0d248a751d22ae5b657938 # Parent 427150724fe1e9f143d3cc75e83b0093e81c154d fixed the write_instances function so that it saves the stack position variable of the instance visual when saving the map. diff -r 427150724fe1 -r 6856cdb22351 engine/python/fife/extensions/savers.py --- a/engine/python/fife/extensions/savers.py Fri Aug 27 16:59:54 2010 +0000 +++ b/engine/python/fife/extensions/savers.py Sun Sep 05 00:41:26 2010 +0000 @@ -182,6 +182,7 @@ for inst in layer.getInstances(): position = inst.getLocationRef().getExactLayerCoordinates() + attr_vals = { (None, 'o'): inst.getObject().getId(), (None, 'x'): str(position.x), @@ -197,6 +198,11 @@ (None, 'r'): 'r', } + visual = inst.get2dGfxVisual(); + if visual: + attr_vals[(None, 'stackpos')] = str(visual.getStackPosition()) + attr_names[(None, 'stackpos')] = 'stackpos' + nspace = inst.getObject().getNamespace() if nspace != self.nspace: attr_vals[(None, 'ns')] = inst.getObject().getNamespace()