Changeset 193:db246683d5da


Ignore:
Timestamp:
Sep 4, 2009, 6:45:06 PM (11 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@194
Message:

Selling eggs now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/gameboard.py

    r192 r193  
    307307    def sell_egg(self, tile_pos):
    308308        def do_sell(chicken):
    309             # Placeholde
     309            if chicken.egg:
     310                # We sell the egg
     311                self.add_cash(constants.SELL_PRICE_CHICKEN)
     312                sound.play_sound("sell-chicken.ogg")
     313                chicken.egg = None
     314                self.eggs -= 1
     315                self.toolbar.update_egg_counter(self.eggs)
     316                # Force update
     317                self.toolbar.chsize()
    310318            return False
     319
    311320        building = self.get_building(tile_pos)
    312321        if building and building.NAME in buildings.HENHOUSES:
    313             self.open_building_dialog(building)
     322            self.open_building_dialog(building, do_sell)
    314323
    315324    def place_animal(self, tile_pos):
Note: See TracChangeset for help on using the changeset viewer.