annotate gamelib/tests/test_walkthrough.py @ 722:b2e362eacfe9 pyntnclick

Update game initialization in gamelib tests
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 15 Jan 2013 20:58:00 +0200
parents 49b6a3d31ee7
children 11daadcb06d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
8 def move_to(self, target):
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
9 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
10 self.assert_current_scene('map')
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
11 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
12 self.assert_current_scene(target)
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
13
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
14 def test_walkthrough(self):
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
15 """A complete game walkthrough.
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
16
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
17 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
18
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
19 # TODO: Add flavour interactions, maybe?
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
20
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
21 # Partially open the door.
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
22 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
23 self.interact_thing('cryo.door')
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
24 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
25
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
26 # Get the titanium leg.
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
27 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
28 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
29 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
30 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
31 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
32 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
33 self.close_detail()
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
34
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
35 # 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
36 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
37 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
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
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
40 # Go to the mess.
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
41 self.move_to('mess')
252
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
42
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
43 # Check that life support is broken
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
44 self.assert_game_data('life support status', 'broken')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
45
252
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
46 # Get the cans.
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
47 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
48 self.interact_thing('mess.cans')
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
49 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
50 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
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.1')
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', 1, '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.2')
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
56 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
57
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
58 # Bash one of the cans.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
59 self.assert_item_exists('dented_can.0', False)
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
60 self.interact_item('full_can.1', 'titanium_leg')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
61 self.assert_inventory_item('dented_can.0')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
62 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
63
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
64 # Go to the machine room.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
65 self.move_to('machine')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
66
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
67 # Sharpen leg into machete.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
68 self.interact_thing('machine.grinder', 'titanium_leg')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
69 self.assert_inventory_item('titanium_leg', False)
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
70 self.assert_inventory_item('machete')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
71
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
72 # Go to the cryo room.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
73 self.move_to('cryo')
252
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
74
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
75 # Chop up some pipes.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
76 self.assert_game_data('fixed', True, 'cryo.pipe.left')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
77 self.interact_thing('cryo.pipe.left', 'machete')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
78 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
79 self.assert_inventory_item('tube_fragment.0')
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
80
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
81 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
82 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
83 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
84 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
85
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', True, 'cryo.pipe.right.bottom')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
87 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
88 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
89 self.assert_inventory_item('tube_fragment.2')
254
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
90
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
91 # Go to the mess.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
92 self.move_to('mess')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
93
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
94 # Clear the broccoli.
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
95 self.assert_game_data('status', 'blocked', 'mess.tubes')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
96 self.interact_thing('mess.tubes', 'machete')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
97 self.assert_game_data('status', 'broken', 'mess.tubes')
ca0c2875ad8f More test fixes.
Jeremy Thurgood <firxen@gmail.com>
parents: 252
diff changeset
98
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
99 # Go to the bridge.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
100 self.move_to('bridge')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
101
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
102 # Check that the AI is online.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
103 self.assert_game_data('ai status', 'online')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
104
355
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
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
121 # Get the poster.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
122 self.interact_thing('crew.poster')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
123 self.assert_inventory_item('escher_poster')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
124 self.assert_scene_thing('crew.poster', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
125
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
126 # Get the fishbowl.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
127 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
128 self.interact_thing('crew.fishbowl')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
129 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
130 self.assert_inventory_item('fishbowl')
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 # Crack the safe.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
133 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
134 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
135 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
136
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
137 # Get the duct tape.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
138 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
139 self.interact_thing('crew.safe')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
140 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
141 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
142
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
143 # Make the helmet.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
144 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
145 self.assert_inventory_item('helmet')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
146 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
147
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
148 # Go to the engine room.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
149 self.move_to('engine')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
150
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
151 # Check that the engines are broken.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
152 self.assert_game_data('engine online', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
153
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
154 # Get the can opener.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
155 self.interact_thing('engine.canopener')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
156 self.assert_inventory_item('canopener')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
157 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
158
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
159 # Open the cans.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
160 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
161 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
162 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
163
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
164 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
165 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
166 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
167
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
168 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
169 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
170 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
171
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
172 # Go to the machine room.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
173 self.move_to('machine')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
174
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
175 # Weld pipes and cans.
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.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
178 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
179 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
180 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
181 self.assert_inventory_item('empty_can.1', False)
536
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
182 self.assert_game_data(
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
183 'contents', set(['tube', 'can']), 'machine.welder.slot')
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
184 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
185 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
186 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
187
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
188 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
189 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
190 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
191 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
192 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
193 self.assert_inventory_item('empty_can.2', False)
536
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
194 self.assert_game_data(
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
195 'contents', set(['tube', 'can']), 'machine.welder.slot')
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
196 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
197 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
198 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
199 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
200
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
201 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
202 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
203 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
204 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
205 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
206 self.assert_inventory_item('empty_can.0', False)
536
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
207 self.assert_game_data(
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
208 'contents', set(['tube', 'can']), 'machine.welder.slot')
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
209 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
210 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
211 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
212 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
213
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
214 # Go to the mess.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
215 self.move_to('mess')
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
216
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
217 # Replace the tubes.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
218 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
219 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
220 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
221
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
222 # Check that life support is replaced
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
223 self.assert_game_data('life support status', 'replaced')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
224
355
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
225 # Tape up the tubes.
bfb6c682b4fb Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents: 254
diff changeset
226 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
227 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
228
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
229 # Check that life support is fixed
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
230 self.assert_game_data('life support status', 'fixed')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
231
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
232 # Get the detergent bottle.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
233 self.interact_thing('mess.detergent')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
234 self.assert_inventory_item('detergent_bottle')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
235
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
236 # Go to the cryo room.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
237 self.move_to('cryo')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
238
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
239 # Fill the detergent bottle.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
240 self.interact_thing('cryo.pool', 'detergent_bottle')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
241 self.assert_inventory_item('detergent_bottle', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
242 self.assert_inventory_item('full_detergent_bottle')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
243
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
244 # Go to the engine room.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
245 self.move_to('engine')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
246
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
247 # Patch the cracked pipe.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
248 self.assert_game_data('fixed', False, 'engine.cracked_pipe')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
249 self.interact_thing('engine.cracked_pipe', 'duct_tape')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
250 self.assert_game_data('fixed', True, 'engine.cracked_pipe')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
251
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
252 # Fill the cryofluid receptacles.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
253 self.assert_game_data('filled', False, 'engine.cryo_containers')
536
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
254 self.interact_thing(
49b6a3d31ee7 PEP-8 tests.
Jeremy Thurgood <firxen@gmail.com>
parents: 456
diff changeset
255 'engine.cryo_container_receptacle', 'full_detergent_bottle')
452
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
256 self.assert_game_data('filled', True, 'engine.cryo_containers')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
257 self.assert_inventory_item('full_detergent_bottle', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
258
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
259 # Remove the burned-out superconductor.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
260 self.assert_game_data('present', True, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
261 self.assert_game_data('working', False, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
262 self.interact_thing('engine.superconductor', 'machete')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
263 self.assert_game_data('present', False, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
264 self.assert_game_data('working', False, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
265
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
266 # Tape up new superconductor.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
267 self.interact_item('superconductor', 'duct_tape')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
268 self.assert_inventory_item('superconductor', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
269 self.assert_inventory_item('taped_superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
270
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
271 # Install superconductor.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
272 self.interact_thing('engine.superconductor', 'taped_superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
273 self.assert_inventory_item('taped_superconductor', False)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
274 self.assert_game_data('present', True, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
275 self.assert_game_data('working', True, 'engine.superconductor')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
276
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
277 # Check that we've fixed the engines.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
278 self.assert_game_data('engine online', True)
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
279
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
280 # Go to the bridge.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
281 self.move_to('bridge')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
282
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
283 # Show JIM the poster.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
284 self.interact_thing('bridge.camera', 'escher_poster')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
285 self.assert_game_data('ai status', 'looping')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
286
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
287 # Get at JIM.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
288 self.assert_game_data('ai panel', 'closed')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
289 self.interact_thing('jim_panel', 'machete')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
290 self.assert_game_data('ai panel', 'open')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
291
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
292 # Break JIM.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
293 self.interact_thing('jim_panel', 'machete')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
294 self.assert_game_data('ai panel', 'broken')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
295
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
296 # Check that we've turned off JIM.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
297 self.assert_game_data('ai status', 'dead')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
298
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
299 # Bring up nav console.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
300 self.interact_thing('bridge.comp')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
301 self.assert_current_detail('bridge_comp_detail')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
302 self.interact_thing('bridge_comp.nav_tab')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
303 self.assert_game_data('tab', 'nav')
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
304
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
305 # Go somewhere interesting.
fdf3a6dd476b Walkthrough test /almost/ finished.
Jeremy Thurgood <firxen@gmail.com>
parents: 355
diff changeset
306 self.interact_thing('bridge_comp.nav_line2')