changeset 244:c629dabe2038

Make tunnel arrows face in the right direction.
author Simon Cross <hodgestar@gmail.com>
date Thu, 15 Sep 2011 00:19:58 +0200
parents f9cc701a6be0
children 0975a995113b
files mamba/sprites.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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