Submodules Update
Added support for submodules! You can now register modules as part of other modules.
To add submodules, include a Submodules table:
(the keyword for this can be changed in settings)
local Player = {}
Player.Submodules = {
script.DataStoreHandler,
script.PurchaseHandler,
script.Character
}
It uses the same register system as regular modules. The load order is done module first, then submodules. Finally, the submodules table is replaced with a dictionary.
If you want a more advanced way to find these submodules, you can provide a callback instead of a table.
local EffectSystem = {}
EffectSystem.Submodules = function()
local submodules = {}
for _, module in pairs(script:GetChildren()) do
table.insert(submodules, module)
end
return submodules
end
To get submodules, the Framework.Get method has been upgraded! You can now provide a chain of submodules after the initial module name.
Player.Framework.Get("Player", "Character")
If you want to perform a deep search, you can keep adding arguments.
(I haven’t extensively tested this, let me know if this has issues)
CombatSystem.Framework.Get("CombatSystem", "Finders", "GetPlayers")
Register and RegisterRuntime have also been upgraded! You can now pass a table to register the given module into. This is optional only for RegisterRuntime, where no table will default to Framework.Modules as usual.
Framework.RegisterRuntime(module, name, modules)
For example:
Character.Framework.RegisterRuntime(script:WaitForChild("Local"), nil, Character.Types)
Some other quality of life changes were made, including more descriptive errors. Let me know if you run into any problems!