Mercurial > fife-parpg
comparison engine/extensions/serializers/xmlobject.py @ 304:17edb4b98e3e
- fixed silly bug in object serializer; missing int cast broke setBlocking / setStatic functionality
NOTE:
- bool("1") and bool("0") are both resulting in True ....
author | chewie@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 20 Jul 2009 16:56:51 +0000 |
parents | 376b8afc9a18 |
children | 48c99636453e |
comparison
equal
deleted
inserted
replaced
303:a33576d94f32 | 304:17edb4b98e3e |
---|---|
77 raise NameClash('Tried to create already existing object, ignoring') | 77 raise NameClash('Tried to create already existing object, ignoring') |
78 raise | 78 raise |
79 | 79 |
80 obj.setResourceLocation(self.source) | 80 obj.setResourceLocation(self.source) |
81 fife.ObjectVisual.create(obj) | 81 fife.ObjectVisual.create(obj) |
82 obj.setBlocking(bool( object.get('blocking', False) )) | 82 obj.setBlocking(bool( int(object.get('blocking', False)) )) |
83 obj.setStatic(bool( object.get('static', False) )) | 83 obj.setStatic(bool( int(object.get('static', False)) )) |
84 | 84 |
85 pather = object.get('pather', 'RoutePather') | 85 pather = object.get('pather', 'RoutePather') |
86 obj.setPather( self.model.getPather(pather) ) | 86 obj.setPather( self.model.getPather(pather) ) |
87 | 87 |
88 self.parse_images(object, obj) | 88 self.parse_images(object, obj) |