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

View File

@@ -7,9 +7,13 @@ __all__ = {"lookup_any_item_id_to_name",
"AutoWorldRegister"}
# import all submodules to trigger AutoWorldRegister
world_folders = []
for file in os.scandir(os.path.dirname(__file__)):
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
lookup_any_item_id_to_name = {}