mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-09-13 04:35:13 -05:00
Merge pull request #56 from kanzure/map-editor-stuff
Remove globals from the map editor
This commit is contained in:
@@ -4,7 +4,10 @@ Configuration
|
||||
|
||||
import os
|
||||
|
||||
import exceptions
|
||||
class ConfigException(Exception):
|
||||
"""
|
||||
Configuration error. Maybe a missing config variable.
|
||||
"""
|
||||
|
||||
class Config(object):
|
||||
"""
|
||||
@@ -23,7 +26,7 @@ class Config(object):
|
||||
if key not in self.__dict__:
|
||||
self._config[key] = value
|
||||
else:
|
||||
raise exceptions.ConfigException(
|
||||
raise ConfigException(
|
||||
"Can't store \"{0}\" in configuration because the key conflicts with an existing property."
|
||||
.format(key)
|
||||
)
|
||||
@@ -49,6 +52,6 @@ class Config(object):
|
||||
elif key in self._config:
|
||||
return self._config[key]
|
||||
else:
|
||||
raise exceptions.ConfigException(
|
||||
raise ConfigException(
|
||||
"no config found for \"{0}\"".format(key)
|
||||
)
|
||||
|
||||
@@ -12,11 +12,6 @@ class TextScriptException(Exception):
|
||||
TextScript encountered an inconsistency or problem.
|
||||
"""
|
||||
|
||||
class ConfigException(Exception):
|
||||
"""
|
||||
Configuration error. Maybe a missing config variable.
|
||||
"""
|
||||
|
||||
class PreprocessorException(Exception):
|
||||
"""
|
||||
There was a problem in the preprocessor.
|
||||
|
||||
@@ -13,7 +13,7 @@ import trainers
|
||||
import romstr
|
||||
|
||||
if __name__ != "__main__":
|
||||
rom = romstr.RomStr(filename=config.rom_path)
|
||||
rom = romstr.RomStr.load(filename=config.rom_path)
|
||||
|
||||
|
||||
def split(list_, interval):
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,8 @@
|
||||
-e git://github.com/drj11/pypng.git@master#egg=pypng
|
||||
|
||||
# for the map editor, pillow instead of PIL
|
||||
pillow
|
||||
|
||||
# testing
|
||||
mock
|
||||
|
||||
|
||||
Reference in New Issue
Block a user