New World Order (#355)

* Core: update jinja

* SM: Optimize a bit

* AutoWorld: import worlds in alphabetical order, to be predictable rather than arbitrary

Co-authored-by: Hussein Farran <hmfarran@gmail.com>
This commit is contained in:
Fabian Dill 2022-03-28 03:45:14 +02:00 committed by GitHub
parent 3bb3a902b3
commit 420be2c44f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,9 +7,13 @@ __all__ = {"lookup_any_item_id_to_name",
"AutoWorldRegister"} "AutoWorldRegister"}
# import all submodules to trigger AutoWorldRegister # import all submodules to trigger AutoWorldRegister
world_folders = []
for file in os.scandir(os.path.dirname(__file__)): for file in os.scandir(os.path.dirname(__file__)):
if file.is_dir(): if file.is_dir():
importlib.import_module(f".{file.name}", "worlds") world_folders.append(file.name)
world_folders.sort()
for world in world_folders:
importlib.import_module(f".{world}", "worlds")
from .AutoWorld import AutoWorldRegister from .AutoWorld import AutoWorldRegister
lookup_any_item_id_to_name = {} lookup_any_item_id_to_name = {}