diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-09-26 01:09:50 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-26 01:09:50 -0500 |
commit | 9d1a68cce57a9e4ac4111853c1597a646866a6af (patch) | |
tree | 2ee35e93d14c7488275779fc8ed9092cdaab4682 /pokemontools/map_editor.py | |
parent | 3f28232f0d7ad1a3c6a72c603c5f8318a57fba64 (diff) |
refactor a global constant to be set in __init__
Diffstat (limited to 'pokemontools/map_editor.py')
-rw-r--r-- | pokemontools/map_editor.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index 11bfb4b..13c3b49 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -31,9 +31,6 @@ if version == 'crystal': header_dir = os.path.join(conf.path, 'maps/') - # todo - display_connections = False - elif version == 'red': map_dir = os.path.join(conf.path, 'maps/') gfx_dir = os.path.join(conf.path, 'gfx/tilesets/') @@ -49,9 +46,6 @@ elif version == 'red': header_path = os.path.join(conf.path, 'main.asm') - # todo - display_connections = False - else: raise Exception, 'version must be "crystal" or "red"' @@ -67,6 +61,8 @@ get_constants() class Application(Frame): def __init__(self, master=None): + self.display_connections = False + Frame.__init__(self, master) self.grid() Style().configure("TFrame", background="#444") @@ -209,7 +205,7 @@ class Application(Frame): self.map.draw_block(block_x, block_y) def init_map_connections(self): - if not display_connections: + if not self.display_connections: return for direction in self.map.connections.keys(): if direction in self.connections.keys(): |