Mercurial > pyntnclick
comparison gamelib/tests/test_scene_interactions_cryo.py @ 67:6b0f7364f3bf
Inventory-related game state.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 23 Aug 2010 20:18:29 +0200 |
parents | 90b32447b239 |
children | e97244b1be30 |
comparison
equal
deleted
inserted
replaced
66:05346a412b55 | 67:6b0f7364f3bf |
---|---|
19 self.assert_game_data('open', False, 'cryo.door') | 19 self.assert_game_data('open', False, 'cryo.door') |
20 | 20 |
21 def test_cryo_door_closed_titanium_leg(self): | 21 def test_cryo_door_closed_titanium_leg(self): |
22 "The door is closed and we touch it with the titanium leg. It opens." | 22 "The door is closed and we touch it with the titanium leg. It opens." |
23 | 23 |
24 self.state.add_inventory_item('titanium_leg') | |
24 self.assert_game_data('accessible', True) | 25 self.assert_game_data('accessible', True) |
25 self.assert_game_data('accessible', False, scene='bridge') | 26 self.assert_game_data('accessible', False, scene='bridge') |
26 self.assert_game_data('open', False, 'cryo.door') | 27 self.assert_game_data('open', False, 'cryo.door') |
27 | 28 |
28 self.interact_thing('cryo.door', 'titanium_leg') | 29 self.interact_thing('cryo.door', 'titanium_leg') |
29 | 30 |
30 self.assert_game_data('accessible', True) | 31 self.assert_game_data('accessible', True) |
31 self.assert_game_data('accessible', True, scene='bridge') | 32 self.assert_game_data('accessible', True, scene='bridge') |
32 self.assert_game_data('open', True, 'cryo.door') | 33 self.assert_game_data('open', True, 'cryo.door') |
34 self.assert_inventory_item('titanium_leg', False) | |
33 | 35 |
34 def test_cryo_door_open_hand(self): | 36 def test_cryo_door_open_hand(self): |
35 "The door is open and we touch it with the hand. No change." | 37 "The door is open and we touch it with the hand. No change." |
36 | 38 |
37 self.set_game_data('accessible', True, scene='bridge') | 39 self.set_game_data('accessible', True, scene='bridge') |
52 self.interact_thing('cryo.door', 'titanium_leg') | 54 self.interact_thing('cryo.door', 'titanium_leg') |
53 | 55 |
54 self.assert_game_data('accessible', True) | 56 self.assert_game_data('accessible', True) |
55 self.assert_game_data('accessible', True, scene='bridge') | 57 self.assert_game_data('accessible', True, scene='bridge') |
56 self.assert_game_data('open', True, 'cryo.door') | 58 self.assert_game_data('open', True, 'cryo.door') |
59 | |
60 def test_cryo_unit_alpha_full_hand(self): | |
61 "The cryo unit has the leg in it and we touch it. We get the leg." | |
62 | |
63 self.assert_game_data('contains_titanium_leg', True, 'cryo.unit.1') | |
64 self.assert_inventory_item('titanium_leg', False) | |
65 | |
66 self.interact_thing('cryo.unit.1') | |
67 | |
68 self.assert_game_data('contains_titanium_leg', False, 'cryo.unit.1') | |
69 self.assert_inventory_item('titanium_leg', True) |