# HG changeset patch # User Neil Muller # Date 1282825197 -7200 # Node ID 6a52752f4920794681a924d6960623bf754aa190 # Parent 060e51d4cef1712756bbd155f824df94dabdf7a6 some more interacations. Add sound to grinder diff -r 060e51d4cef1 -r 6a52752f4920 gamelib/scenes/machine.py --- a/gamelib/scenes/machine.py Thu Aug 26 14:18:53 2010 +0200 +++ b/gamelib/scenes/machine.py Thu Aug 26 14:19:57 2010 +0200 @@ -111,7 +111,8 @@ self.state.replace_inventory_item(item, self.state.items['titanium_machete']) return Result("After much delicate grinding and a few close calls with" " various body parts, the titanium femur now resembles" - " a machete more than a bone. Nice and sharp, too.") + " a machete more than a bone. Nice and sharp, too.", + soundfile="grinder.ogg") def get_description(self): return "A pretty ordinary, albeit rather industrial, grinding machine." diff -r 060e51d4cef1 -r 6a52752f4920 gamelib/scenes/mess.py --- a/gamelib/scenes/mess.py Thu Aug 26 14:18:53 2010 +0200 +++ b/gamelib/scenes/mess.py Thu Aug 26 14:19:57 2010 +0200 @@ -30,6 +30,15 @@ INVENTORY_IMAGE = "empty_can.png" CURSOR = CursorSprite('empty_can_cursor.png', 20, 30) + def interact_with_full_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_dented_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_empty_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + class FullCan(CloneableItem): "Found on the shelf." @@ -41,7 +50,16 @@ dented = DentedCan("dented_can") state.add_item(dented) state.replace_inventory_item(self, dented) - return Result("You club the can with the femur. The can gets dented, but doesn't open.") + return Result("You club the can with the femur. The can gets dented, but doesn't open.", soundfile="can_hit.ogg") + + def interact_with_full_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_dented_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_empty_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") class DentedCan(CloneableItem): @@ -51,7 +69,16 @@ CURSOR = CursorSprite('dented_can_cursor.png', 20, 30) def interact_with_titanium_leg(self, item, state): - return Result("You club the can with the femur. The dents shift around, but it still doesn't open.") + return Result("You club the can with the femur. The dents shift around, but it still doesn't open.", soundfile="can_hit.ogg") + + def interact_with_full_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_dented_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") + + def interact_with_empty_can(self, item, state): + return Result("You bang the cans togther. It sounds like two cans being banged togther.", soundfile="can_hit.ogg") class TubeFragments(Item):