changeset 440:e945c4186ee5

Restore buildings properly.
author Simon Cross <hodgestar@gmail.com>
date Sat, 21 Nov 2009 18:42:15 +0000
parents cf4b020e6385
children 7b5e4b6dd889
files gamelib/buildings.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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),