diff options
| author | Bryan Bishop <kanzure@gmail.com> | 2013-09-01 14:40:41 -0500 | 
|---|---|---|
| committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-01 14:40:41 -0500 | 
| commit | 4bd6505e9592b489033646839fff54fa5eb39061 (patch) | |
| tree | 27f7d876400636767c5fd645dc03e350120e1fe5 | |
| parent | 6d7296cbdf21d1786e37fbe452e926b196676ed9 (diff) | |
"import pksv" instead of "from pksv import .."
| -rw-r--r-- | pokemontools/crystal.py | 18 | 
1 files changed, 7 insertions, 11 deletions
| diff --git a/pokemontools/crystal.py b/pokemontools/crystal.py index d99b407..ec911f9 100644 --- a/pokemontools/crystal.py +++ b/pokemontools/crystal.py @@ -65,12 +65,7 @@ import re  from interval_map import IntervalMap -from pksv import ( -    pksv_gs, -    pksv_crystal, -    pksv_crystal_unknowns, -    pksv_crystal_more_enders -) +import pksv  # ---- script_parse_table explanation ----  # This is an IntervalMap that keeps track of previously parsed scripts, texts @@ -2892,7 +2887,7 @@ def create_command_classes(debug=False):      klasses = [GivePoke]      for (byte, cmd) in pksv_crystal_more.items():          cmd_name = cmd[0].replace(" ", "_") -        params = {"id": byte, "size": 1, "end": byte in pksv_crystal_more_enders, "macro_name": cmd_name} +        params = {"id": byte, "size": 1, "end": byte in pksv.pksv_crystal_more_enders, "macro_name": cmd_name}          params["param_types"] = {}          if len(cmd) > 1:              param_types = cmd[1:] @@ -3238,7 +3233,8 @@ def pretty_print_pksv_no_names():      use this to keep track of commands without pksv names      pksv_no_names is created in parse_script_engine_script_at"""      for (command_byte, addresses) in pksv_no_names.items(): -        if command_byte in pksv_crystal_unknowns: continue +        if command_byte in pksv.pksv_crystal_unknowns: +            continue          print hex(command_byte) + " appearing in these scripts: "          for address in addresses:              print "    " + hex(address) @@ -3318,8 +3314,8 @@ class Script:          items = []          if type(self.commands) == dict:              for (id, command) in self.commands.items(): -                if command["type"] in pksv_crystal: -                    items.append(pksv_crystal[command["type"]]) +                if command["type"] in pksv.pksv_crystal: +                    items.append(pksv.pksv_crystal[command["type"]])                  else:                      items.append(hex(command["type"]))          else: @@ -3507,7 +3503,7 @@ def compare_script_parsing_methods(address):          errors += 1      for (id, oldcommand) in oldscript.commands.items():          newcommand = newscript.commands[id] -        oldcommand_pksv_name = pksv_crystal[oldcommand["type"]].replace(" ", "_") +        oldcommand_pksv_name = pksv.pksv_crystal[oldcommand["type"]].replace(" ", "_")          if oldcommand["start_address"] != newcommand.address:              logging.debug(                  "The two address (command id={id}) do not match old={old} new={new}" | 
