Skip to content

Commit da95280

Browse files
AWSWCommunityAWSWCommunity
authored andcommitted
Store more data about a mod in the registry
1 parent 8a3ce92 commit da95280

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modloader/modclass.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import modinfo
2+
import sys
23

34
class Mod():
45
"""The Mod class
@@ -40,6 +41,6 @@ def loadable_mod(modclass):
4041
raise Exception("Class must be a subclass of Mod")
4142

4243
mod = modclass() # Create a new instance of the class
43-
mod_name, _, _ = mod.mod_info() # Get just the mod name
44+
mod_name, version, author = mod.mod_info()
4445
mod.mod_load() # Load the mod
45-
modinfo.add_mod(mod_name, mod)
46+
modinfo.add_mod(modclass.__module__, (mod, mod_name, version, author, sys.modules[modclass.__module__]))

0 commit comments

Comments
 (0)