Mercurial > pyntnclick
comparison gamelib/scenes/cryo.py @ 134:faac82748f5a
Put the leg inside the cryo unit.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 20:21:07 +0200 |
parents | 0530547a131f |
children | b43599b7f8a2 |
comparison
equal
deleted
inserted
replaced
133:0530547a131f | 134:faac82748f5a |
---|---|
61 INITIAL_DATA = { | 61 INITIAL_DATA = { |
62 'contains_titanium_leg': True, | 62 'contains_titanium_leg': True, |
63 } | 63 } |
64 | 64 |
65 def interact_without(self): | 65 def interact_without(self): |
66 self.state.add_inventory_item('titanium_leg') | 66 return Result(detail_view='cryo_detail') |
67 self.set_data('contains_titanium_leg', False) | |
68 return Result("The skeletal occupant of this cryo unit has an artificial femur made of titanium. You take it.") | |
69 | |
70 def is_interactive(self): | |
71 return self.get_data('contains_titanium_leg') | |
72 | 67 |
73 def get_description(self): | 68 def get_description(self): |
74 if self.get_data('contains_titanium_leg'): | 69 if self.get_data('contains_titanium_leg'): |
75 return "A broken cryo chamber, with an poor unfortunate corpse inside" | 70 return "A broken cryo chamber, with an poor unfortunate corpse inside" |
76 return "A broken cryo chamber. The corpse inside is missing a leg" | 71 return "A broken cryo chamber. The corpse inside is missing a leg" |
167 "Triangle in the cryo room." | 162 "Triangle in the cryo room." |
168 | 163 |
169 NAME = "cryo.titanium_leg" | 164 NAME = "cryo.titanium_leg" |
170 | 165 |
171 INTERACTS = { | 166 INTERACTS = { |
172 "triangular": InteractImage(50, 50, "triangle.png"), | 167 "leg": InteractImage(50, 50, "triangle.png"), |
173 } | 168 } |
174 | 169 |
175 INITIAL = "triangular" | 170 INITIAL = "leg" |
176 | 171 |
177 def interact_without(self): | 172 def interact_without(self): |
178 return Result("You interacted.") | 173 self.state.add_inventory_item('titanium_leg') |
179 | 174 self.state.current_scene.things['cryo.unit.1'].set_data('contains_titanium_leg', False) |
180 def is_interactive(self): | 175 self.scene.remove_thing(self) |
181 return True | 176 return Result("The skeletal occupant of this cryo unit has an artificial femur made of titanium. You take it.") |
182 | 177 |
183 | 178 |
184 class CryoUnitWithCorpse(Scene): | 179 class CryoUnitWithCorpse(Scene): |
185 | 180 |
186 FOLDER = "cryo" | 181 FOLDER = "cryo" |