Make action.GLYPHS a function, action.get_glyphs.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:35:33 +0000 (20:35 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:35:33 +0000 (20:35 +0200)
naja/actions.py
naja/widgets/info_area.py
naja/widgets/tile.py

index 6f03358b34b64de2d4c0b01027ab083ac3707482..5f282353557078e8ff3bf671d2684a30e699f199 100644 (file)
@@ -16,6 +16,9 @@ class LocationAction(object):
         self.required_bits = required_bits
         self.data = data
 
+    def get_glyphs(self):
+        return self.GLYPHS
+
     def get_text(self, location=None):
         substitutions = self.data.copy()
 
index 50164eaa48599a1dc07208c3d8fa24a25f4f9d6c..40dcdc031d68267388f52b32644107a0811495ba 100644 (file)
@@ -148,7 +148,7 @@ class InfoAreaWidget(Widget):
         else:
             glyphs_x_offset = INFO_LEFT_PADDING
 
-        for glyph in action.GLYPHS:
+        for glyph in action.get_glyphs():
             img = resources.get_image(
                 glyph, transforms=(EIGHT_BIT, blender(PALETTE.GREY)))
             self.surface.blit(img, (glyphs_x_offset, glyphs_y_offset - 4))
index cf6f04c92d4ef498163dc1f694ff6255fca46af7..e925674b44aae8b3440a73044c5969eefcc1b747 100644 (file)
@@ -117,7 +117,7 @@ class TileWidget(Widget):
     def _prepare_action(self, action, y_offset):
         x_offset = self._prepare_lock(action, y_offset)
         if self.board_pos != self.state.player.position:
-            for glyph in action.GLYPHS:
+            for glyph in action.get_glyphs():
                 img = resources.get_image(glyph, transforms=(EIGHT_BIT,))
                 self.surface.blit(img, (x_offset, y_offset + 4))
                 x_offset += img.get_width()