comparison gamelib/scenes/crew_quarters.py @ 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 6d93e04036c9
children 125cb389ab90
comparison
equal deleted inserted replaced
341:7d30cff9f949 342:e1cae2b61443
29 "The plant is doing surprisingly well for centuries of neglect", 29 "The plant is doing surprisingly well for centuries of neglect",
30 ((624, 215, 61, 108),))) 30 ((624, 215, 61, 108),)))
31 self.add_thing(GenericDescThing('crew.cat', 2, 31 self.add_thing(GenericDescThing('crew.cat', 2,
32 "A picture of a cat labelled 'Clementine'", 32 "A picture of a cat labelled 'Clementine'",
33 ((722, 382, 66, 72),))) 33 ((722, 382, 66, 72),)))
34
35 def enter(self):
36 return Result("The crew were a messy bunch. Or maybe that's just the intervening centuries.")
37 34
38 35
39 class ToMap(Door): 36 class ToMap(Door):
40 37
41 SCENE = "crew" 38 SCENE = "crew"
120 return Result("The fishbowl is useful, but its contents aren't.") 117 return Result("The fishbowl is useful, but its contents aren't.")
121 118
122 def get_description(self): 119 def get_description(self):
123 return "This fishbowl looks exactly like an old science fiction space helmet." 120 return "This fishbowl looks exactly like an old science fiction space helmet."
124 121
125
126 class Fishbowl(Item): 122 class Fishbowl(Item):
127 "A bowl. Sans fish." 123 "A bowl. Sans fish."
128 124
129 INVENTORY_IMAGE = 'fishbowl.png' 125 INVENTORY_IMAGE = 'fishbowl.png'
130 CURSOR = CursorSprite('fishbowl.png') 126 CURSOR = CursorSprite('fishbowl.png')
127 NAME = "fishbowl"
128
129 def interact_with_duct_tape(self, item, state):
130 helmet = FishbowlHelmet('helmet')
131 state.add_item(helmet)
132 state.replace_inventory_item(self.name, helmet.name)
133 return Result("You duct tape the edges of the helmet. The seal is"
134 " crude, but it will serve as a workable helmet if needed")
135
136
137 class FishbowlHelmet(Item):
138 "A bowl with duct-tape"
139
140 INVENTORY_IMAGE = "fishbowl_helmet.png"
141 CURSOR = CursorSprite('fishbowl_helmet.png')
142 NAME = "helmet"
131 143
132 144
133 class DuctTape(Item): 145 class DuctTape(Item):
134 "A bowl. Sans fish." 146 "A bowl. Sans fish."
135 147