File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 6060 modName - the name of the mod
6161 parent - the parent mod, or nil if this mod stands alone
6262--]]
63- function ModUtil .Mod .Register ( first , second )
63+ function ModUtil .Mod .Register ( first , second , meta )
6464 local modName , parent
6565 if type ( first ) == " string" then
6666 modName , parent = first , second
@@ -71,7 +71,7 @@ function ModUtil.Mod.Register( first, second )
7171 parent = _G
7272 SaveIgnores [ modName ] = true
7373 end
74- local mod = { }
74+ local mod = parent [ modName ] or { }
7575 parent [ modName ] = mod
7676 local path = ModUtil .Identifiers .Data [ parent ]
7777 if path ~= nil then
@@ -82,6 +82,9 @@ function ModUtil.Mod.Register( first, second )
8282 path = path .. modName
8383 ModUtil .Mods .Data [ path ] = mod
8484 ModUtil .Identifiers .Inverse [ path ] = mod
85+ if meta == false then
86+ return mod
87+ end
8588 return setmetatable ( mod , ModUtil .Metatables .Mod )
8689end
8790
You can’t perform that action at this time.
0 commit comments