comparison gamelib/scenes/bridge.py @ 491:9f488671c02e engine_refactor

No more state in Item interacts.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 29 Aug 2010 19:58:35 +0200
parents c72946d3a59a
children 3e91c82c2240
comparison
equal deleted inserted replaced
490:2e784f978d1a 491:9f488671c02e
215 "Used for connecting high-powered parts of the ship up" 215 "Used for connecting high-powered parts of the ship up"
216 216
217 INVENTORY_IMAGE = 'superconductor_fixed.png' 217 INVENTORY_IMAGE = 'superconductor_fixed.png'
218 CURSOR = CursorSprite('superconductor_fixed.png') 218 CURSOR = CursorSprite('superconductor_fixed.png')
219 219
220 def interact_with_duct_tape(self, item, state): 220 def interact_with_duct_tape(self, item):
221 taped_superconductor = TapedSuperconductor('taped_superconductor') 221 taped_superconductor = TapedSuperconductor('taped_superconductor')
222 state.add_item(taped_superconductor) 222 self.state.add_item(taped_superconductor)
223 state.replace_inventory_item(self.name, taped_superconductor.name) 223 self.state.replace_inventory_item(self.name, taped_superconductor.name)
224 return Result("You rip off a piece of duct tape and stick it on the superconductor. " 224 return Result("You rip off a piece of duct tape and stick it on the superconductor. "
225 "It almost sticks to itself, but you successfully avoid disaster.") 225 "It almost sticks to itself, but you successfully avoid disaster.")
226 226
227 227
228 class SuperconductorThing(Thing): 228 class SuperconductorThing(Thing):