We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a400cd commit 8a3ce92Copy full SHA for 8a3ce92
modloader/__init__.py
@@ -3,6 +3,7 @@
3
import sys
4
import modinfo
5
import importlib
6
+import modinfo
7
8
print('AWSW Mod Loader Init')
9
@@ -28,8 +29,12 @@ def get_mod_path():
28
29
30
# Try importing the mod. If all goes well, the mod is imported through the Mod class
31
print("Begin mod load: {}".format(mod))
- #try:
32
- importlib.import_module(mod)
+
33
+ mod_object = importlib.import_module(mod)
34
35
+ # Run through the module's attributes to determine whether we should load it as a legacy mod.
36
+ if not 'loadable_mod' in dir(mod_object):
37
+ modinfo.add_mod(mod, mod_object)
38
39
# After all mods are loaded, call their respective mod_complete functions
40
for mod_name, mod in modinfo.get_mods().iteritems():
0 commit comments