Hook up shift glyph
[naja.git] / naja / actions.py
index 0ada21be372024131d2175ce54b92fce58933ddb..d73a66aae4ba0dfede3cbd60e1961531f9299146 100644 (file)
@@ -21,7 +21,8 @@ class LocationAction(object):
 
         if 'shift' in self.data:
             substitutions['shift'] = self.data['shift']
-            substitutions['direction'] = self.data['direction']
+            substitutions['shift_glyph'] = ('{SHIFT_%s}'
+                                            % self.data['direction'].upper())
         elif 'direction' in self.data:
             substitutions['rowcol'] = {
                 'NORTH': 'column',
@@ -101,8 +102,8 @@ class ToggleBits(LocationAction):
 
 
 class ShiftBits(LocationAction):
-    TEXT = "Barrel-shift player %(shift)s bits %(direction)s."
-    GLYPHS = (ACTION_GLYPHS.CHANGE_BOARD,)
+    TEXT = "Barrel-shift player bits %(shift_glyph)s %(shift)s."
+    GLYPHS = (ACTION_GLYPHS.SHIFT_LEFT,)
 
     def perform_action(self, board, location):
         shift = self.data['shift']