Mercurial > boomslang
annotate gamelib/tests/test_walkthrough.py @ 426:dabc9d15c18c
Jim complains when you break the chair
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 28 Aug 2010 23:25:48 +0200 |
parents | bfb6c682b4fb |
children | fdf3a6dd476b |
rev | line source |
---|---|
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
1 import game_logic_utils |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
2 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
3 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
4 class TestWalkthrough(game_logic_utils.GameLogicTestCase): |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
5 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
6 CURRENT_SCENE = 'cryo' |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
7 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
8 def close_detail(self): |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
9 self.state.set_current_detail(None) |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
10 |
254 | 11 def move_to(self, target): |
12 self.interact_thing(self.state.current_scene.name + '.door') | |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
13 self.assert_current_scene('map') |
254 | 14 self.interact_thing('map.to' + target) |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
15 self.assert_current_scene(target) |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
16 |
254 | 17 def test_walkthrough_complete(self): |
18 self.fail("Walkthrough incomplete.") | |
19 | |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
20 def test_walkthrough(self): |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
21 """A complete game walkthrough. |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
22 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
23 This should only contain interacts and assertions.""" |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
24 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
25 # TODO: Add flavour interactions, maybe? |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
26 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
27 # Partially open the door. |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
28 self.assert_game_data('door', 'shut', 'cryo.door') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
29 self.interact_thing('cryo.door') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
30 self.assert_game_data('door', 'ajar', 'cryo.door') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
31 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
32 # Get the titanium leg. |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
33 self.interact_thing('cryo.unit.1') |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
34 self.assert_current_detail('cryo_detail') |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
35 self.assert_detail_thing('cryo.titanium_leg') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
36 self.interact_thing('cryo.titanium_leg') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
37 self.assert_detail_thing('cryo.titanium_leg', False) |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
38 self.assert_inventory_item('titanium_leg') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
39 self.close_detail() |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
40 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
41 # Open the door the rest of the way. |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
42 self.interact_thing('cryo.door', 'titanium_leg') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
43 self.assert_game_data('door', 'open', 'cryo.door') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
44 self.assert_inventory_item('titanium_leg') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
45 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
46 # Go to the mess. |
254 | 47 self.move_to('mess') |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
48 |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
49 # Get the cans. |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
50 self.assert_game_data('cans_available', 3, 'mess.cans') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
51 self.interact_thing('mess.cans') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
52 self.assert_inventory_item('full_can.0') |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
53 self.assert_game_data('cans_available', 2, 'mess.cans') |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
54 self.interact_thing('mess.cans') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
55 self.assert_inventory_item('full_can.1') |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
56 self.assert_game_data('cans_available', 1, 'mess.cans') |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
57 self.interact_thing('mess.cans') |
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
58 self.assert_inventory_item('full_can.2') |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
59 self.assert_scene_thing('mess.cans', False) |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
60 |
254 | 61 # Bash one of the cans. |
62 self.assert_item_exists('dented_can.0', False) | |
63 self.interact_item('full_can.1', 'titanium_leg') | |
64 self.assert_inventory_item('dented_can.0') | |
65 self.assert_inventory_item('full_can.1', False) | |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
66 |
254 | 67 # Go to the machine room. |
68 self.move_to('machine') | |
69 | |
70 # Sharpen leg into machete. | |
71 self.interact_thing('machine.grinder', 'titanium_leg') | |
72 self.assert_inventory_item('titanium_leg', False) | |
73 self.assert_inventory_item('machete') | |
74 | |
75 # Go to the cryo room. | |
76 self.move_to('cryo') | |
252
dfc89bc64fdb
Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
77 |
254 | 78 # Chop up some pipes. |
79 self.assert_game_data('fixed', True, 'cryo.pipe.left') | |
80 self.interact_thing('cryo.pipe.left', 'machete') | |
81 self.assert_game_data('fixed', False, 'cryo.pipe.left') | |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
82 self.assert_inventory_item('tube_fragment.0') |
254 | 83 |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
84 self.assert_game_data('fixed', True, 'cryo.pipe.right.top') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
85 self.interact_thing('cryo.pipe.right.top', 'machete') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
86 self.assert_game_data('fixed', False, 'cryo.pipe.right.top') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
87 self.assert_inventory_item('tube_fragment.1') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
88 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
89 self.assert_game_data('fixed', True, 'cryo.pipe.right.bottom') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
90 self.interact_thing('cryo.pipe.right.bottom', 'machete') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
91 self.assert_game_data('fixed', False, 'cryo.pipe.right.bottom') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
92 self.assert_inventory_item('tube_fragment.2') |
254 | 93 |
94 # Go to the mess. | |
95 self.move_to('mess') | |
96 | |
97 # Clear the broccoli. | |
98 self.assert_game_data('status', 'blocked', 'mess.tubes') | |
99 self.interact_thing('mess.tubes', 'machete') | |
100 self.assert_game_data('status', 'broken', 'mess.tubes') | |
101 | |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
102 # Go to the bridge. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
103 self.move_to('bridge') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
104 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
105 # Get the stethoscope. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
106 self.interact_thing('bridge.stethoscope') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
107 self.assert_inventory_item('stethoscope') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
108 self.assert_scene_thing('bridge.stethoscope', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
109 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
110 # Get the superconductor. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
111 self.interact_thing('bridge.massagechair_base') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
112 self.assert_current_detail('chair_detail') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
113 self.interact_thing('bridge.superconductor') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
114 self.assert_inventory_item('superconductor') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
115 self.assert_detail_thing('bridge.superconductor', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
116 self.close_detail() |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
117 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
118 # Go to the crew quarters. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
119 self.move_to('crew_quarters') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
120 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
121 # Get the fishbowl. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
122 self.assert_game_data('has_bowl', True, 'crew.fishbowl') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
123 self.interact_thing('crew.fishbowl') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
124 self.assert_game_data('has_bowl', False, 'crew.fishbowl') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
125 self.assert_inventory_item('fishbowl') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
126 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
127 # Crack the safe. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
128 self.assert_game_data('is_cracked', False, 'crew.safe') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
129 self.interact_thing('crew.safe', 'stethoscope') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
130 self.assert_game_data('is_cracked', True, 'crew.safe') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
131 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
132 # Get the duct tape. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
133 self.assert_game_data('has_tape', True, 'crew.safe') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
134 self.interact_thing('crew.safe') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
135 self.assert_game_data('has_tape', False, 'crew.safe') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
136 self.assert_inventory_item('duct_tape') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
137 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
138 # Make the helmet. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
139 self.interact_item('fishbowl', 'duct_tape') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
140 self.assert_inventory_item('helmet') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
141 self.assert_inventory_item('fishbowl', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
142 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
143 # Go to the engine room. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
144 self.move_to('engine') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
145 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
146 # Get the can opener. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
147 self.interact_thing('engine.canopener') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
148 self.assert_inventory_item('canopener') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
149 self.assert_scene_thing('engine.canopener', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
150 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
151 # Open the cans. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
152 self.interact_item('full_can.2', 'canopener') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
153 self.assert_inventory_item('full_can.2', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
154 self.assert_inventory_item('empty_can.0') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
155 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
156 self.interact_item('full_can.0', 'canopener') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
157 self.assert_inventory_item('full_can.0', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
158 self.assert_inventory_item('empty_can.1') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
159 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
160 self.interact_item('dented_can.0', 'canopener') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
161 self.assert_inventory_item('dented_can.0', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
162 self.assert_inventory_item('empty_can.2') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
163 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
164 # Go to the machine room. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
165 self.move_to('machine') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
166 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
167 # Weld pipes and cans. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
168 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
169 self.interact_thing('machine.welder.slot', 'tube_fragment.0') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
170 self.assert_inventory_item('tube_fragment.0', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
171 self.assert_game_data('contents', set(['tube']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
172 self.interact_thing('machine.welder.slot', 'empty_can.1') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
173 self.assert_inventory_item('empty_can.1', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
174 self.assert_game_data('contents', set(['tube', 'can']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
175 self.interact_thing('machine.welder.button') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
176 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
177 self.assert_inventory_item('cryo_pipes_one') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
178 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
179 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
180 self.interact_thing('machine.welder.slot', 'tube_fragment.2') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
181 self.assert_inventory_item('tube_fragment.2', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
182 self.assert_game_data('contents', set(['tube']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
183 self.interact_thing('machine.welder.slot', 'empty_can.2') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
184 self.assert_inventory_item('empty_can.2', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
185 self.assert_game_data('contents', set(['tube', 'can']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
186 self.interact_thing('machine.welder.button') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
187 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
188 self.assert_inventory_item('cryo_pipes_one', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
189 self.assert_inventory_item('cryo_pipes_two') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
190 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
191 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
192 self.interact_thing('machine.welder.slot', 'tube_fragment.1') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
193 self.assert_inventory_item('tube_fragment.1', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
194 self.assert_game_data('contents', set(['tube']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
195 self.interact_thing('machine.welder.slot', 'empty_can.0') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
196 self.assert_inventory_item('empty_can.0', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
197 self.assert_game_data('contents', set(['tube', 'can']), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
198 self.interact_thing('machine.welder.button') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
199 self.assert_game_data('contents', set(), 'machine.welder.slot') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
200 self.assert_inventory_item('cryo_pipes_two', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
201 self.assert_inventory_item('cryo_pipes_three') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
202 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
203 # Go to the mess. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
204 self.move_to('mess') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
205 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
206 # Replace the tubes. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
207 self.interact_thing('mess.tubes', 'cryo_pipes_three') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
208 self.assert_inventory_item('cryo_pipes_three', False) |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
209 self.assert_game_data('status', 'replaced', 'mess.tubes') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
210 |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
211 # Tape up the tubes. |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
212 self.interact_thing('mess.tubes', 'duct_tape') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
213 self.assert_game_data('status', 'fixed', 'mess.tubes') |
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
254
diff
changeset
|
214 |