Mercurial > boomslang
comparison gamelib/scenes/mess.py @ 206:6a52752f4920
some more interacations. Add sound to grinder
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Thu, 26 Aug 2010 14:19:57 +0200 |
parents | b1f4262139e7 |
children | 6ad6575b501c |
comparison
equal
deleted
inserted
replaced
205:060e51d4cef1 | 206:6a52752f4920 |
---|---|
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', 20, 30) | 31 CURSOR = CursorSprite('empty_can_cursor.png', 20, 30) |
32 | 32 |
33 def interact_with_full_can(self, item, state): | |
34 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
35 | |
36 def interact_with_dented_can(self, item, state): | |
37 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
38 | |
39 def interact_with_empty_can(self, item, state): | |
40 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
41 | |
33 | 42 |
34 class FullCan(CloneableItem): | 43 class FullCan(CloneableItem): |
35 "Found on the shelf." | 44 "Found on the shelf." |
36 | 45 |
37 INVENTORY_IMAGE = "full_can.png" | 46 INVENTORY_IMAGE = "full_can.png" |
39 | 48 |
40 def interact_with_titanium_leg(self, item, state): | 49 def interact_with_titanium_leg(self, item, state): |
41 dented = DentedCan("dented_can") | 50 dented = DentedCan("dented_can") |
42 state.add_item(dented) | 51 state.add_item(dented) |
43 state.replace_inventory_item(self, dented) | 52 state.replace_inventory_item(self, dented) |
44 return Result("You club the can with the femur. The can gets dented, but doesn't open.") | 53 return Result("You club the can with the femur. The can gets dented, but doesn't open.", soundfile="can_hit.ogg") |
54 | |
55 def interact_with_full_can(self, item, state): | |
56 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
57 | |
58 def interact_with_dented_can(self, item, state): | |
59 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
60 | |
61 def interact_with_empty_can(self, item, state): | |
62 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
45 | 63 |
46 | 64 |
47 class DentedCan(CloneableItem): | 65 class DentedCan(CloneableItem): |
48 "A can banged on with the femur" | 66 "A can banged on with the femur" |
49 | 67 |
50 INVENTORY_IMAGE = "dented_can.png" | 68 INVENTORY_IMAGE = "dented_can.png" |
51 CURSOR = CursorSprite('dented_can_cursor.png', 20, 30) | 69 CURSOR = CursorSprite('dented_can_cursor.png', 20, 30) |
52 | 70 |
53 def interact_with_titanium_leg(self, item, state): | 71 def interact_with_titanium_leg(self, item, state): |
54 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.") | 72 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.", soundfile="can_hit.ogg") |
73 | |
74 def interact_with_full_can(self, item, state): | |
75 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
76 | |
77 def interact_with_dented_can(self, item, state): | |
78 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
79 | |
80 def interact_with_empty_can(self, item, state): | |
81 return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") | |
55 | 82 |
56 | 83 |
57 class TubeFragments(Item): | 84 class TubeFragments(Item): |
58 "Old tubes that need repair." | 85 "Old tubes that need repair." |
59 | 86 |