# HG changeset patch # User Simon Cross # Date 1258828935 0 # Node ID e945c4186ee5353bf608f87bddc26ebe85218bce # Parent cf4b020e63853e4f3e195c7374805234e1613540 Restore buildings properly. diff -r cf4b020e6385 -r e945c4186ee5 gamelib/buildings.py --- a/gamelib/buildings.py Sat Nov 21 18:34:36 2009 +0000 +++ b/gamelib/buildings.py Sat Nov 21 18:42:15 2009 +0000 @@ -135,6 +135,14 @@ return cls((0, 0)) make = classmethod(make) + def unsimplify(cls, *args, **kwargs): + """Override default Simplifiable unsimplification.""" + obj = super(Building, cls).unsimplify(*args, **kwargs) + obj._set_main_image() + obj.update_occupant_count() + return obj + unsimplify = classmethod(unsimplify) + def _set_images(self): self.images = {'fixed': { 'day': imagecache.load_image(self.IMAGE),