Mercurial > pyntnclick
comparison gamelib/scenes/engine.py @ 418:6a24970a0d21
Engine room art is done\!
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sat, 28 Aug 2010 22:57:05 +0200 |
parents | 0fd5796a1562 |
children | fc36fb0937a6 |
comparison
equal
deleted
inserted
replaced
417:aba8e7895324 | 418:6a24970a0d21 |
---|---|
30 self.add_thing(ArrowsTopLeft()) | 30 self.add_thing(ArrowsTopLeft()) |
31 self.add_thing(ArrowsBottomLeft()) | 31 self.add_thing(ArrowsBottomLeft()) |
32 self.add_thing(ArrowsRight()) | 32 self.add_thing(ArrowsRight()) |
33 self.add_thing(DangerSign()) | 33 self.add_thing(DangerSign()) |
34 self.add_thing(Stars()) | 34 self.add_thing(Stars()) |
35 self.add_thing(CrackedPipe()) | |
35 self.add_thing(ToMap()) | 36 self.add_thing(ToMap()) |
36 self.add_thing(GenericDescThing('engine.body', 1, | 37 self.add_thing(GenericDescThing('engine.body', 1, |
37 "Dead. I think those cans were past their sell-by date.", | 38 "Dead. I think those cans were past their sell-by date.", |
38 ( | 39 ( |
39 (594, 387, 45, 109), | 40 (594, 387, 45, 109), |
259 def interact_without(self): | 260 def interact_without(self): |
260 return Result("You stick your finger in the receptacle. " | 261 return Result("You stick your finger in the receptacle. " |
261 "It almost gets stuck") | 262 "It almost gets stuck") |
262 | 263 |
263 def interact_with_full_detergent_bottle(self, item): | 264 def interact_with_full_detergent_bottle(self, item): |
265 if not self.scene.things['engine.cracked_pipe'].get_data('fixed'): | |
266 return Result("You think pouring the precious cryo fluid into a" | |
267 " container connected to a cracked pipe would be a waste.") | |
264 self.state.remove_inventory_item(item.name) | 268 self.state.remove_inventory_item(item.name) |
265 self.state.current_scene.things['engine.cryo_containers'] \ | 269 self.state.current_scene.things['engine.cryo_containers'] \ |
266 .set_data('filled', True) | 270 .set_data('filled', True) |
267 self.state.current_scene.things['engine.cryo_containers'] \ | 271 self.state.current_scene.things['engine.cryo_containers'] \ |
268 .set_interact('full') | 272 .set_interact('full') |
290 (140, 135, 31, 64), | 294 (140, 135, 31, 64), |
291 (168, 156, 33, 57), | 295 (168, 156, 33, 57), |
292 (200, 172, 27, 55), | 296 (200, 172, 27, 55), |
293 (105, 159, 15, 289), | 297 (105, 159, 15, 289), |
294 (0, 309, 128, 16), | 298 (0, 309, 128, 16), |
295 (0, 411, 44, 27), | |
296 (41, 401, 39, 24), | |
297 (79, 390, 28, 22), | 299 (79, 390, 28, 22), |
298 (257, 209, 27, 10), | 300 (257, 209, 27, 10), |
299 (249, 225, 26, 20), | 301 (249, 225, 26, 20), |
300 (272, 237, 25, 17), | 302 (272, 237, 25, 17), |
301 (294, 247, 41, 24), | 303 (294, 247, 41, 24), |
431 | 433 |
432 def is_interactive(self): | 434 def is_interactive(self): |
433 return False | 435 return False |
434 | 436 |
435 | 437 |
438 class CrackedPipe(Thing): | |
439 NAME = "engine.cracked_pipe" | |
440 | |
441 INTERACTS = { | |
442 'cracked': InteractImage(13, 402, 'cracked_pipe.png'), | |
443 'taped': InteractImage(13, 402, 'duct_taped_pipe.png'), | |
444 } | |
445 | |
446 INITIAL = 'cracked' | |
447 | |
448 INITIAL_DATA = { | |
449 'fixed': False, | |
450 } | |
451 | |
452 def get_description(self): | |
453 if self.get_data('fixed'): | |
454 return "The duct tape appears to be holding." | |
455 else: | |
456 return "The pipe looks cracked and won't hold" \ | |
457 " fluid until it's fixed." | |
458 | |
459 def interact_with_duct_tape(self, item): | |
460 if set.get_data('fixed'): | |
461 return Result("The duct tape already there appears to be" | |
462 " sufficient.") | |
463 else: | |
464 self.set_data('fixed', True) | |
465 self.set_interact('taped') | |
466 return Result("You apply your trust duct tape to the" | |
467 " creak, sealing it.") | |
468 | |
469 | |
436 class ToMap(Door): | 470 class ToMap(Door): |
437 | 471 |
438 SCENE = "engine" | 472 SCENE = "engine" |
439 | 473 |
440 INTERACTS = { | 474 INTERACTS = { |
444 INITIAL = "door" | 478 INITIAL = "door" |
445 | 479 |
446 def get_description(self): | 480 def get_description(self): |
447 return "The airlock leads back to the rest of the ship." | 481 return "The airlock leads back to the rest of the ship." |
448 | 482 |
483 | |
449 SCENES = [Engine] | 484 SCENES = [Engine] |