comparison gamelib/scenes/bridge.py @ 399:1cfcd82519b6

You have to duct tape the superconductor
author Stefano Rivera <stefano@rivera.za.net>
date Sat, 28 Aug 2010 21:24:04 +0200
parents 21faf5c8804c
children df3216b369b1
comparison
equal deleted inserted replaced
398:1555677d86f6 399:1cfcd82519b6
198 self.scene.doctor.rect.append(self.rect) 198 self.scene.doctor.rect.append(self.rect)
199 return Result("You pick up the stethoscope and verify that the doctor's " 199 return Result("You pick up the stethoscope and verify that the doctor's "
200 "heart has stopped. Probably a while ago.") 200 "heart has stopped. Probably a while ago.")
201 201
202 202
203 class TapedSuperconductor(Item):
204 "Used for connecting high-powered parts of the ship up"
205
206 INVENTORY_IMAGE = 'superconductor_taped.png'
207 CURSOR = CursorSprite('superconductor_taped_cursor.png')
208
209
203 class Superconductor(Item): 210 class Superconductor(Item):
204 "Used for connecting high-powered parts of the ship up" 211 "Used for connecting high-powered parts of the ship up"
205 212
206 INVENTORY_IMAGE = 'superconductor_fixed.png' 213 INVENTORY_IMAGE = 'superconductor_fixed.png'
207 CURSOR = CursorSprite('superconductor_fixed.png') 214 CURSOR = CursorSprite('superconductor_fixed.png')
215
216 def interact_with_duct_tape(self, item, state):
217 taped_superconductor = TapedSuperconductor('taped_superconductor')
218 state.add_item(taped_superconductor)
219 state.replace_inventory_item(self.name, taped_superconductor.name)
220 return Result("You rip off a piece of duct tape and stick it on the superconductor. "
221 "It almost sticks to itself, but you successfully avoid disaster.")
208 222
209 223
210 class SuperconductorThing(Thing): 224 class SuperconductorThing(Thing):
211 "Superconductor from the massage chair." 225 "Superconductor from the massage chair."
212 226