comparison gamelib/tests/test_scene_interactions_cryo.py @ 247:0bad554d0926

More tests, some cryo room fixes and docs in the build.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 13:32:27 +0200
parents 30f2308c1efc
children dfc89bc64fdb
comparison
equal deleted inserted replaced
246:b6cfaad7deee 247:0bad554d0926
84 84
85 resp = self.interact_thing('cryo.unit.1') 85 resp = self.interact_thing('cryo.unit.1')
86 86
87 self.assertEquals('cryo_detail', resp.detail_view) 87 self.assertEquals('cryo_detail', resp.detail_view)
88 88
89 def test_pipes_unchopped_hand(self):
90 "Touch the unchopped cryopipes with the hand. No change."
91
92 self.assert_game_data('fixed', True, 'cryo.pipe.left')
93 self.assert_game_data('fixed', True, 'cryo.pipe.right')
94
95 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left'))
96 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right'))
97
98 self.assert_game_data('fixed', True, 'cryo.pipe.left')
99 self.assert_game_data('fixed', True, 'cryo.pipe.right')
100
101 def test_pipes_chopped_hand(self):
102 "Touch the chopped cryopipes with the hand. No change."
103
104 self.set_game_data('fixed', False, 'cryo.pipe.left')
105 self.set_game_data('fixed', False, 'cryo.pipe.right')
106
107 self.assertEquals(None, self.interact_thing('cryo.pipe.left'))
108 self.assertEquals(None, self.interact_thing('cryo.pipe.right'))
109
110 self.assert_game_data('fixed', False, 'cryo.pipe.left')
111 self.assert_game_data('fixed', False, 'cryo.pipe.right')
112
113 def test_pipes_unchopped_machete(self):
114 "Touch the unchopped cryopipes with the machete. They chop."
115
116 self.assert_game_data('fixed', True, 'cryo.pipe.left')
117 self.assert_game_data('fixed', True, 'cryo.pipe.right')
118 self.assert_item_exists('cryo_pipe.0', False)
119 self.assert_item_exists('cryo_pipe.1', False)
120
121 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left', 'machete'))
122 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right', 'machete'))
123
124 self.assert_game_data('fixed', False, 'cryo.pipe.left')
125 self.assert_game_data('fixed', False, 'cryo.pipe.right')
126 self.assert_item_exists('cryo_pipe.0')
127 self.assert_item_exists('cryo_pipe.1')
128 self.assert_inventory_item('cryo_pipe.0', True)
129 self.assert_inventory_item('cryo_pipe.1', True)
130
131 def test_pipes_chopped_machete(self):
132 "Touch the chopped cryopipes with the machete. No change."
133
134 self.set_game_data('fixed', False, 'cryo.pipe.left')
135 self.set_game_data('fixed', False, 'cryo.pipe.right')
136
137 self.assertEquals(None, self.interact_thing('cryo.pipe.left', 'machete'))
138 self.assertEquals(None, self.interact_thing('cryo.pipe.right', 'machete'))
139
140 self.assert_game_data('fixed', False, 'cryo.pipe.left')
141 self.assert_game_data('fixed', False, 'cryo.pipe.right')