Mercurial > rinkhals
changeset 228:f74de4280e20
Sell chicken's equipment when you sell the chicken.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 23:32:32 +0000 |
parents | b9782f622006 |
children | 96d440bebdaa |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Fri Sep 04 23:26:25 2009 +0000 +++ b/gamelib/gameboard.py Fri Sep 04 23:32:32 2009 +0000 @@ -347,6 +347,9 @@ if len(self.chickens) == 1: print "You can't sell your last chicken!" return False + for item in list(chicken.equipment): + self.add_cash(item.sell_price()) + chicken.unequip(item) self.add_cash(constants.SELL_PRICE_CHICKEN) sound.play_sound("sell-chicken.ogg") return True