start of split

This commit is contained in:
Fabian Dill
2021-05-13 01:34:59 +02:00
parent fb192b989d
commit 109eb5b9dc
5 changed files with 56 additions and 11 deletions

12
worlds/loader.py Normal file
View File

@@ -0,0 +1,12 @@
import importlib
import os
world_types = []
world_folder = os.path.dirname(__file__)
for entry in os.scandir(world_folder):
if entry.is_dir():
entryname = entry.name
if not entryname.startswith("_"):
world_module = importlib.import_module("."+entry.name, package="worlds")
world_types.append(world_module)
print(world_folder)
print(world_types)