Mercurial > pyntnclick
comparison gamelib/scenes/mess.py @ 167:5845a3ed4dad
Inventory interaction can (surprisingly) affect the inventory
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Wed, 25 Aug 2010 12:21:16 +0200 |
parents | d00aa26941c4 |
children | de249f7867fc |
comparison
equal
deleted
inserted
replaced
166:0db92b3b5833 | 167:5845a3ed4dad |
---|---|
28 "After emptying the full can." | 28 "After emptying the full can." |
29 | 29 |
30 INVENTORY_IMAGE = "empty_can.png" | 30 INVENTORY_IMAGE = "empty_can.png" |
31 CURSOR = CursorSprite('empty_can_cursor.png', 47, 3) | 31 CURSOR = CursorSprite('empty_can_cursor.png', 47, 3) |
32 | 32 |
33 | |
34 class FullCan(Item): | 33 class FullCan(Item): |
35 "Found on the shelf." | 34 "Found on the shelf." |
36 | 35 |
37 INVENTORY_IMAGE = "full_can.png" | 36 INVENTORY_IMAGE = "full_can.png" |
38 CURSOR = CursorSprite('full_can_cursor.png', 47, 3) | 37 CURSOR = CursorSprite('full_can_cursor.png', 47, 3) |
38 | |
39 def interact_with_titanium_leg(self, tool, state): | |
40 state.replace_inventory_item(self, DentedCan("dented_can")) | |
41 return Result("You club the can with the femur. The can gets dented, but doesn't open.") | |
42 | |
43 | |
44 class DentedCan(FullCan): | |
45 "A can banged on with the femur" | |
46 | |
47 def interact_with_titanium_leg(self, tool, inventory): | |
48 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.") | |
39 | 49 |
40 | 50 |
41 class TubeFragments(Item): | 51 class TubeFragments(Item): |
42 "Old tubes that need repair." | 52 "Old tubes that need repair." |
43 | 53 |