Mercurial > boomslang
comparison gamelib/scenes/bridge.py @ 316:4a7aa7fcd191
Only the base of the massage chair brings up the subscene
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 28 Aug 2010 12:35:09 +0200 |
parents | 7b07ffc37ec0 |
children | 67e8a547970b |
comparison
equal
deleted
inserted
replaced
315:7b07ffc37ec0 | 316:4a7aa7fcd191 |
---|---|
41 self.background_playlist = None | 41 self.background_playlist = None |
42 self.add_item(Superconductor('superconductor')) | 42 self.add_item(Superconductor('superconductor')) |
43 self.add_item(Stethoscope('stethoscope')) | 43 self.add_item(Stethoscope('stethoscope')) |
44 self.add_thing(ToMap()) | 44 self.add_thing(ToMap()) |
45 self.add_thing(MassageChair()) | 45 self.add_thing(MassageChair()) |
46 self.add_thing(MassageChairBase()) | |
46 self.add_thing(StethoscopeThing()) | 47 self.add_thing(StethoscopeThing()) |
47 self.add_thing(BridgeComputer()) | 48 self.add_thing(BridgeComputer()) |
48 self.add_thing(LeftLights()) | 49 self.add_thing(LeftLights()) |
49 self.add_thing(RightLights()) | 50 self.add_thing(RightLights()) |
50 self.add_thing(GenericDescThing('bridge.wires', 1, | 51 self.add_thing(GenericDescThing('bridge.wires', 1, |
116 "The captain's massage chair, contains superconductor" | 117 "The captain's massage chair, contains superconductor" |
117 | 118 |
118 NAME = 'bridge.massagechair' | 119 NAME = 'bridge.massagechair' |
119 | 120 |
120 INTERACTS = { | 121 INTERACTS = { |
121 'chair': InteractRectUnion(( | 122 'chair': InteractNoImage(127, 518, 69, 64), |
122 (76, 365, 72, 216), | |
123 (148, 486, 160, 97), | |
124 (148, 418, 77, 68), | |
125 )), | |
126 } | 123 } |
127 | 124 |
128 INITIAL = 'chair' | 125 INITIAL = 'chair' |
129 | 126 |
130 INITIAL_DATA = { | 127 INITIAL_DATA = { |
134 def interact_without(self): | 131 def interact_without(self): |
135 return Result(detail_view='chair_detail') | 132 return Result(detail_view='chair_detail') |
136 | 133 |
137 def get_description(self): | 134 def get_description(self): |
138 if self.get_data('contains_superconductor'): | 135 if self.get_data('contains_superconductor'): |
139 return "A top of the line Massage-o-Matic Captain's Executive Command Chair." | 136 return "A top of the line Massage-o-Matic Captain's Executive Command Chair. " \ |
137 "It's massaging a skeleton." | |
140 return "The chair won't work any more, it has no power." | 138 return "The chair won't work any more, it has no power." |
141 | 139 |
140 | |
141 class MassageChairBase(Thing): | |
142 "The captain's massage chair, contains superconductor" | |
143 | |
144 NAME = 'bridge.massagechair_base' | |
145 | |
146 INTERACTS = { | |
147 'chair': InteractRectUnion(( | |
148 (148, 418, 77, 68), | |
149 (69, 363, 80, 156), | |
150 (104, 514, 18, 40), | |
151 (147, 487, 106, 32), | |
152 (220, 518, 83, 49), | |
153 (196, 502, 75, 34), | |
154 (207, 534, 69, 51), | |
155 )), | |
156 } | |
157 | |
158 INITIAL = 'chair' | |
159 | |
160 def get_description(self): | |
161 return self.state.current_scene.things['bridge.massagechair'] \ | |
162 .get_description() | |
142 | 163 |
143 class Stethoscope(Item): | 164 class Stethoscope(Item): |
144 "Used for cracking safes. Found on the doctor on the chair" | 165 "Used for cracking safes. Found on the doctor on the chair" |
145 | 166 |
146 INVENTORY_IMAGE = 'stethoscope.png' | 167 INVENTORY_IMAGE = 'stethoscope.png' |