Mercurial > pyntnclick
changeset 342:e1cae2b61443
Add duct_tape + fishbowl = helmet
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 14:42:41 +0200 |
parents | 7d30cff9f949 |
children | b3bc101171ea |
files | gamelib/scenes/crew_quarters.py |
diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/scenes/crew_quarters.py Sat Aug 28 14:41:35 2010 +0200 +++ b/gamelib/scenes/crew_quarters.py Sat Aug 28 14:42:41 2010 +0200 @@ -32,9 +32,6 @@ "A picture of a cat labelled 'Clementine'", ((722, 382, 66, 72),))) - def enter(self): - return Result("The crew were a messy bunch. Or maybe that's just the intervening centuries.") - class ToMap(Door): @@ -122,12 +119,27 @@ def get_description(self): return "This fishbowl looks exactly like an old science fiction space helmet." - class Fishbowl(Item): "A bowl. Sans fish." INVENTORY_IMAGE = 'fishbowl.png' CURSOR = CursorSprite('fishbowl.png') + NAME = "fishbowl" + + def interact_with_duct_tape(self, item, state): + helmet = FishbowlHelmet('helmet') + state.add_item(helmet) + state.replace_inventory_item(self.name, helmet.name) + return Result("You duct tape the edges of the helmet. The seal is" + " crude, but it will serve as a workable helmet if needed") + + +class FishbowlHelmet(Item): + "A bowl with duct-tape" + + INVENTORY_IMAGE = "fishbowl_helmet.png" + CURSOR = CursorSprite('fishbowl_helmet.png') + NAME = "helmet" class DuctTape(Item):