# HG changeset patch # User Stefano Rivera # Date 1283023444 -7200 # Node ID 1cfcd82519b69cca6d1fbe882e811eb00ac6bbd9 # Parent 1555677d86f60e35cf144735d3f65b6cfe98b1d4 You have to duct tape the superconductor diff -r 1555677d86f6 -r 1cfcd82519b6 Resources/images/crew_quarters/open_safe_full.png Binary file Resources/images/crew_quarters/open_safe_full.png has changed diff -r 1555677d86f6 -r 1cfcd82519b6 Resources/images/items/superconductor_fixed_cursor.png Binary file Resources/images/items/superconductor_fixed_cursor.png has changed diff -r 1555677d86f6 -r 1cfcd82519b6 Resources/images/items/superconductor_taped.png Binary file Resources/images/items/superconductor_taped.png has changed diff -r 1555677d86f6 -r 1cfcd82519b6 Resources/images/items/superconductor_taped_cursor.png Binary file Resources/images/items/superconductor_taped_cursor.png has changed diff -r 1555677d86f6 -r 1cfcd82519b6 gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Sat Aug 28 21:05:36 2010 +0200 +++ b/gamelib/scenes/bridge.py Sat Aug 28 21:24:04 2010 +0200 @@ -200,12 +200,26 @@ "heart has stopped. Probably a while ago.") +class TapedSuperconductor(Item): + "Used for connecting high-powered parts of the ship up" + + INVENTORY_IMAGE = 'superconductor_taped.png' + CURSOR = CursorSprite('superconductor_taped_cursor.png') + + class Superconductor(Item): "Used for connecting high-powered parts of the ship up" INVENTORY_IMAGE = 'superconductor_fixed.png' CURSOR = CursorSprite('superconductor_fixed.png') + def interact_with_duct_tape(self, item, state): + taped_superconductor = TapedSuperconductor('taped_superconductor') + state.add_item(taped_superconductor) + state.replace_inventory_item(self.name, taped_superconductor.name) + return Result("You rip off a piece of duct tape and stick it on the superconductor. " + "It almost sticks to itself, but you successfully avoid disaster.") + class SuperconductorThing(Thing): "Superconductor from the massage chair." diff -r 1555677d86f6 -r 1cfcd82519b6 gamelib/scenes/engine.py --- a/gamelib/scenes/engine.py Sat Aug 28 21:05:36 2010 +0200 +++ b/gamelib/scenes/engine.py Sat Aug 28 21:24:04 2010 +0200 @@ -196,6 +196,15 @@ return Result("With leverage, the burned-out superconductor snaps out.") def interact_with_superconductor(self, item): + if self.get_data('present'): + return Result("It might help to remove the broken superconductor first") + else: + return Result("You plug in the superconductor, and feel a humm " + "as things kick into life. " + "Unfortunately, it's the wrong size for the socket " + "and just falls out again when you let go.") + + def interact_with_taped_superconductor(self, item): if not self.get_data('present'): self.set_interact('fixed') self.set_data('present', True) diff -r 1555677d86f6 -r 1cfcd82519b6 sources/art/open_safe_full.xcf Binary file sources/art/open_safe_full.xcf has changed diff -r 1555677d86f6 -r 1cfcd82519b6 sources/art/superconductor_taped.xcf Binary file sources/art/superconductor_taped.xcf has changed diff -r 1555677d86f6 -r 1cfcd82519b6 sources/art/superconductor_taped_cursor.xcf Binary file sources/art/superconductor_taped_cursor.xcf has changed