diff gamelib/gameboard.py @ 216:962934b8c7dc

Implement UI part of egg selling
author Neil Muller <drnlmuller@gmail.com>
date Fri, 04 Sep 2009 22:04:04 +0000
parents 85a5299caf4a
children 76faa0eb38f0
line wrap: on
line diff
--- a/gamelib/gameboard.py	Fri Sep 04 22:01:20 2009 +0000
+++ b/gamelib/gameboard.py	Fri Sep 04 22:04:04 2009 +0000
@@ -354,7 +354,7 @@
                 # We sell the egg
                 self.add_cash(constants.SELL_PRICE_EGG)
                 sound.play_sound("sell-chicken.ogg")
-                chicken.egg = None
+                chicken.remove_egg()
                 self.eggs -= 1
                 self.toolbar.update_egg_counter(self.eggs)
                 # Force update
@@ -480,6 +480,9 @@
                     if sell_callback(place.occupant):
                         # empty the nest (on button)
                         update_button(place.occupant, empty=True)
+                    else:
+                        # Update for equipment changes, etc.
+                        update_button(place.occupant)
             else:
                 # there is no occupant, attempt to fill the space
                 if self.animal_to_place is not None: