Mercurial > pyntnclick
comparison gamelib/scenes/bridge.py @ 259:b6e1c4e4e59d
Superconductor Thing now works.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Fri, 27 Aug 2010 19:01:00 +0200 |
parents | 59dba2dcb280 |
children | 3b4a78422201 |
comparison
equal
deleted
inserted
replaced
258:a7c8fb27a183 | 259:b6e1c4e4e59d |
---|---|
5 from albow.music import change_playlist, get_music, PlayList | 5 from albow.music import change_playlist, get_music, PlayList |
6 from albow.resource import get_image | 6 from albow.resource import get_image |
7 | 7 |
8 from gamelib.cursor import CursorSprite | 8 from gamelib.cursor import CursorSprite |
9 from gamelib.state import Scene, Item, Thing, Result, InteractText, \ | 9 from gamelib.state import Scene, Item, Thing, Result, InteractText, \ |
10 InteractNoImage, InteractRectUnion, InteractAnimated | 10 InteractNoImage, InteractRectUnion, InteractImage, \ |
11 InteractAnimated | |
11 from gamelib.statehelpers import GenericDescThing | 12 from gamelib.statehelpers import GenericDescThing |
12 from gamelib.scenes.scene_widgets import Door | 13 from gamelib.scenes.scene_widgets import Door |
13 | 14 |
14 class Bridge(Scene): | 15 class Bridge(Scene): |
15 | 16 |
151 "Superconductor from the massage chair." | 152 "Superconductor from the massage chair." |
152 | 153 |
153 NAME ='bridge.superconductor' | 154 NAME ='bridge.superconductor' |
154 | 155 |
155 INTERACTS = { | 156 INTERACTS = { |
156 'superconductor': InteractText(100, 200, 'Superconductor'), | 157 'superconductor': InteractImage(158, 138, 'superconductor.png'), |
157 } | 158 } |
158 | 159 |
159 INITIAL = 'superconductor' | 160 INITIAL = 'superconductor' |
160 | 161 |
161 def interact_without(self): | 162 def interact_without(self): |
162 self.state.add_inventory_item('superconductor') | 163 self.state.add_inventory_item('superconductor') |
163 self.state.current_scene.things['bridge.massagechair'] \ | 164 self.state.current_scene.things['bridge.massagechair'] \ |
164 .set_data('contains_superconductor', False) | 165 .set_data('contains_superconductor', False) |
165 self.scene.remove_thing(self) | 166 self.scene.remove_thing(self) |
166 return Result("You pick up the stethoscope and verify that the doctor's " | 167 return Result("The superconductor module unclips easily.") |
167 "heart has stoped. Probably a while ago.") | |
168 | 168 |
169 class BlinkingLights(Thing): | 169 class BlinkingLights(Thing): |
170 | 170 |
171 def get_description(self): | 171 def get_description(self): |
172 return random.choice([ | 172 return random.choice([ |