# HG changeset patch # User Simon Cross # Date 1316038798 -7200 # Node ID c629dabe20386006b92566cfb1d311631c6920a8 # Parent f9cc701a6be082ed81023e37f12347aec12156e7 Make tunnel arrows face in the right direction. diff -r f9cc701a6be0 -r c629dabe2038 mamba/sprites.py --- a/mamba/sprites.py Thu Sep 15 00:14:23 2011 +0200 +++ b/mamba/sprites.py Thu Sep 15 00:19:58 2011 +0200 @@ -204,18 +204,18 @@ world.snake.exit_level() -class TunnelSprite(SingleImageTileSprite): +class TunnelSprite(DirectionalTile): image_name = 'arrow-r' name = 'tunnel entrance' tileset = 'lab' def __init__(self, other_id, direction): - super(TunnelSprite, self).__init__(tile_char=None) - self.other_id = other_id - self.direction = { + direction = { 'north': UP, 'south': DOWN, 'east': LEFT, 'west': RIGHT, }[direction] + super(TunnelSprite, self).__init__(tile_char=None, direction=direction) + self.other_id = other_id def interact(self, world, segment): head = world.snake.head