Mercurial > pyntnclick
comparison gamelib/scenes/cryo.py @ 55:2e2f6ff54780
Part of the cryo door puzzle.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 23 Aug 2010 13:27:50 +0200 |
parents | ad6f56bfa8b7 |
children | 75bf3d3689e9 |
comparison
equal
deleted
inserted
replaced
54:0abd45c58bd3 | 55:2e2f6ff54780 |
---|---|
42 "Door to the cryo room." | 42 "Door to the cryo room." |
43 | 43 |
44 FOLDER = "cryo" | 44 FOLDER = "cryo" |
45 IMAGE = "cryo_door_closed" | 45 IMAGE = "cryo_door_closed" |
46 | 46 |
47 INITIAL_DATA = { | |
48 'open': False, | |
49 } | |
50 | |
51 def interact(self, item): | |
52 if self.get_data('open'): | |
53 print "Door open" | |
54 return | |
55 Thing.interact(self, item) | |
56 | |
47 def interact_with_titanium_leg(self, item): | 57 def interact_with_titanium_leg(self, item): |
48 self.message("You wedge the titanium leg into the chain and twist. With a satisfying *snap*, the chain breaks and the door opens.") | 58 self.message("You wedge the titanium leg into the chain and twist. With a satisfying *snap*, the chain breaks and the door opens.") |
49 self.scene.remove_thing(self) | 59 self.open_door() |
50 | 60 |
51 def interact_without(self): | 61 def interact_without(self): |
52 self.message("It moves slightly and then stops. A chain on the other side is preventing it from opening completely.") | 62 self.message("It moves slightly and then stops. A chain on the other side is preventing it from opening completely.") |
53 | 63 |
54 def interact_default(self, item): | 64 def interact_default(self, item): |
56 "Sadly, this isn't that sort of game.", | 66 "Sadly, this isn't that sort of game.", |
57 "Your valiant efforts are foiled by the Evil Game Designer.", | 67 "Your valiant efforts are foiled by the Evil Game Designer.", |
58 "The door resists. Try something else, perhaps?", | 68 "The door resists. Try something else, perhaps?", |
59 ])) | 69 ])) |
60 | 70 |
71 def open_door(self): | |
72 self.set_data('open', True) | |
73 self.state.scenes['bridge'].set_data('accessible', True) | |
74 | |
61 | 75 |
62 SCENES = [Cryo] | 76 SCENES = [Cryo] |