Mercurial > boomslang
comparison gamelib/scenes/mess.py @ 170:179913efac85
Add dented can image to item
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Wed, 25 Aug 2010 12:41:02 +0200 |
parents | de249f7867fc |
children | 3d3efc5648cc |
comparison
equal
deleted
inserted
replaced
169:3cb71ab6404e | 170:179913efac85 |
---|---|
35 | 35 |
36 INVENTORY_IMAGE = "full_can.png" | 36 INVENTORY_IMAGE = "full_can.png" |
37 CURSOR = CursorSprite('full_can_cursor.png', 20, 30) | 37 CURSOR = CursorSprite('full_can_cursor.png', 20, 30) |
38 | 38 |
39 def interact_with_titanium_leg(self, tool, state): | 39 def interact_with_titanium_leg(self, tool, state): |
40 state.replace_inventory_item(self, DentedCan("dented_can")) | 40 dented = DentedCan("dented_can") |
41 state.replace_inventory_item(self, dented) | |
41 return Result("You club the can with the femur. The can gets dented, but doesn't open.") | 42 return Result("You club the can with the femur. The can gets dented, but doesn't open.") |
42 | 43 |
43 | 44 |
44 class DentedCan(FullCan): | 45 class DentedCan(FullCan): |
45 "A can banged on with the femur" | 46 "A can banged on with the femur" |
47 | |
48 INVENTORY_IMAGE = "dented_can.png" | |
49 CURSOR = CursorSprite('dented_can_cursor.png', 20, 30) | |
46 | 50 |
47 def interact_with_titanium_leg(self, tool, inventory): | 51 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.") | 52 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.") |
49 | 53 |
50 | 54 |