Mercurial > rinkhals
comparison gamelib/buildings.py @ 440:e945c4186ee5
Restore buildings properly.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 18:42:15 +0000 |
parents | cf4b020e6385 |
children | b74b3a37cf1d |
comparison
equal
deleted
inserted
replaced
439:cf4b020e6385 | 440:e945c4186ee5 |
---|---|
132 | 132 |
133 def make(cls): | 133 def make(cls): |
134 """Override default Simplifiable object creation.""" | 134 """Override default Simplifiable object creation.""" |
135 return cls((0, 0)) | 135 return cls((0, 0)) |
136 make = classmethod(make) | 136 make = classmethod(make) |
137 | |
138 def unsimplify(cls, *args, **kwargs): | |
139 """Override default Simplifiable unsimplification.""" | |
140 obj = super(Building, cls).unsimplify(*args, **kwargs) | |
141 obj._set_main_image() | |
142 obj.update_occupant_count() | |
143 return obj | |
144 unsimplify = classmethod(unsimplify) | |
137 | 145 |
138 def _set_images(self): | 146 def _set_images(self): |
139 self.images = {'fixed': { | 147 self.images = {'fixed': { |
140 'day': imagecache.load_image(self.IMAGE), | 148 'day': imagecache.load_image(self.IMAGE), |
141 'night': imagecache.load_image(self.IMAGE, ('night',)), | 149 'night': imagecache.load_image(self.IMAGE, ('night',)), |