changeset 578:356795038b87 pyntnclick

Remove a couple of uses os DEBUG.
author Simon Cross <hodgestar+bzr@gmail.com>
date Sat, 11 Feb 2012 16:17:52 +0200
parents ccc26c23d2c1
children 071a93441995
files gamelib/scenes/bridge.py pyntnclick/scenewidgets.py
diffstat 2 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/bridge.py	Sat Feb 11 16:04:45 2012 +0200
+++ b/gamelib/scenes/bridge.py	Sat Feb 11 16:17:52 2012 +0200
@@ -13,10 +13,6 @@
                                   InteractImage, InteractAnimated,
                                   GenericDescThing)
 
-# XXX: Need a way to get at the constants.
-from pyntnclick.constants import GameConstants
-DEBUG = GameConstants().debug
-
 from gamelib.scenes.game_constants import PLAYER_ID
 from gamelib.scenes.game_widgets import Door, BaseCamera, make_jim_dialog
 
@@ -454,8 +450,8 @@
     def __init__(self, number, rect, ai_blocked):
         super(DestNavPageLine, self).__init__()
         self.name = 'bridge_comp.nav_line%s' % number
-        if DEBUG:
-            self._interact_hilight_color = Color(THECOLORS.keys()[number])
+        # set debugging higlight color for when DEBUG is on.
+        self._interact_hilight_color = Color(THECOLORS.keys()[number])
         r = Rect(rect)
         self.interacts = {}
         self.interacts['line'] = InteractNoImage(r.x, r.y, r.w, r.h)
--- a/pyntnclick/scenewidgets.py	Sat Feb 11 16:04:45 2012 +0200
+++ b/pyntnclick/scenewidgets.py	Sat Feb 11 16:17:52 2012 +0200
@@ -10,10 +10,6 @@
 from pyntnclick.state import Thing
 from pyntnclick.widgets import BoomLabel
 
-# XXX: Need a way to get at the constants.
-from pyntnclick.constants import GameConstants
-DEBUG = GameConstants().debug
-
 
 class Interact(object):
 
@@ -141,9 +137,8 @@
         self.interacts = {
                 'description': InteractRectUnion(areas)
                 }
-        if DEBUG:
-            # Individual colors to make debugging easier
-            self._interact_hilight_color = Color(THECOLORS.keys()[number])
+        # Individual colors to make debugging easier
+        self._interact_hilight_color = Color(THECOLORS.keys()[number])
 
     def get_description(self):
         return self.description