API:ModulesInitializeAllEnabled
From RoR Wiki
UI Lua API · Module functions
Version: WAR 1.4.8
Initializes every loaded UI module that is enabled and not yet initialized.
ModulesInitializeAllEnabled()
Arguments
None.
Returns
Nothing.
Details
- The client goes through its module list in order and initializes each module the same way as ModuleInitialize: dependencies first, then the module's files and its
OnInitializeentries. - Modules that are disabled, already initialized, or have already failed are skipped. Calling the function again therefore only picks up modules loaded since the last call.
- Failures are logged and recorded in the module's
loadStatus(see ModulesGetData); the remaining modules are still initialized. - With SetCheckForCircularDependencies on, circular-dependency errors include the load order.
Errors
None from the function itself. Per-module errors are listed on ModuleInitialize.
Example
From interfacecore/interfacecore.lua:
for _, modFilePath in ipairs( PREGAME_MODS )
do
ModuleLoad( modFilePath, SystemData.UiModuleType.PREGAME, IsInternalBuild() )
end
ModulesInitializeAllEnabled()
