Mercurial > pyntnclick
comparison gamelib/scenes/mess.py @ 435:19aff54b2e73
Many small fixes.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 28 Aug 2010 23:48:50 +0200 |
parents | add81f2b747e |
children | af2a23b9787d |
comparison
equal
deleted
inserted
replaced
434:9bcb6148fc6b | 435:19aff54b2e73 |
---|---|
9 InteractImageRect, InteractAnimated, | 9 InteractImageRect, InteractAnimated, |
10 GenericDescThing) | 10 GenericDescThing) |
11 | 11 |
12 from gamelib.sound import get_sound | 12 from gamelib.sound import get_sound |
13 from gamelib import constants | 13 from gamelib import constants |
14 from gamelib.scenes.game_constants import PLAYER_ID | |
14 | 15 |
15 | 16 |
16 class Mess(Scene): | 17 class Mess(Scene): |
17 | 18 |
18 FOLDER = "mess" | 19 FOLDER = "mess" |
196 self.set_data('status', 'replaced') | 197 self.set_data('status', 'replaced') |
197 self.set_interact("replaced") | 198 self.set_interact("replaced") |
198 self.scene.set_data('life support status', 'replaced') | 199 self.scene.set_data('life support status', 'replaced') |
199 return Result( | 200 return Result( |
200 "The pipes slot neatly into place, but don't make an airtight seal. " | 201 "The pipes slot neatly into place, but don't make an airtight seal. " |
201 "You think one of the pipes has cracked slightly as well." | 202 "One of the pipes has cracked slightly as well." |
202 ) | 203 ) |
203 | 204 |
204 def interact_with_duct_tape(self, item): | 205 def interact_with_duct_tape(self, item): |
205 if self.get_data("status") == "broken": | 206 if self.get_data("status") == "broken": |
206 return Result("It would get lost in the fronds.") | 207 return Result("It would get lost in the fronds.") |
213 self.scene.set_data('life support status', 'fixed') | 214 self.scene.set_data('life support status', 'fixed') |
214 # TODO: A less anticlimactic climax? | 215 # TODO: A less anticlimactic climax? |
215 return Result("It takes quite a lot of tape, but eventually everything is" | 216 return Result("It takes quite a lot of tape, but eventually everything is" |
216 " airtight and ready to hold pressure. Who'd've thought duct" | 217 " airtight and ready to hold pressure. Who'd've thought duct" |
217 " tape could actually be used to tape ducts?") | 218 " tape could actually be used to tape ducts?") |
219 | |
220 def interact_without(self): | |
221 if self.get_data("status") == "blocked": | |
222 return Result("The mutant broccoli resists your best efforts.") | |
223 elif self.get_data("status") == "broken": | |
224 return Result("Shoving the broken pipes around doesn't help much.") | |
225 elif self.get_data("status") == "replaced": | |
226 return Result("Do you really want to hold it together for the " | |
227 "rest of the voyage?") | |
228 else: | |
229 return Result("You don't find any leaks. Good job, Prisoner %s." % PLAYER_ID) | |
218 | 230 |
219 | 231 |
220 class Boomslang(Thing): | 232 class Boomslang(Thing): |
221 NAME = 'mess.boomslang' | 233 NAME = 'mess.boomslang' |
222 | 234 |
271 'taken': False, | 283 'taken': False, |
272 } | 284 } |
273 | 285 |
274 def interact_without(self): | 286 def interact_without(self): |
275 if self.get_data('taken'): | 287 if self.get_data('taken'): |
276 return Result("I think one dishwashing liquid bottle is enough for now") | 288 return Result("The remaining bottles leak.") |
277 self.set_data('taken', True) | 289 self.set_data('taken', True) |
278 self.set_interact('taken') | 290 self.set_interact('taken') |
279 self.state.add_inventory_item('detergent_bottle') | 291 self.state.add_inventory_item('detergent_bottle') |
280 return Result("You pick up an empty dishwashing liquid bottle. You can't find any sponges") | 292 return Result("You pick up an empty dishwashing liquid bottle. You can't find any sponges.") |
281 | 293 |
282 def get_description(self): | 294 def get_description(self): |
283 return "Empty plastic containers. They used to hold dishwasher soap." | 295 return "Empty plastic containers. They used to hold dishwasher soap." |
284 | 296 |
285 | 297 |