Delay initialization of ACE_Modules until settings are properly setup

This commit is contained in:
esteldunedain 2015-05-30 01:18:23 -03:00
parent d46074ad27
commit 333cb80171
2 changed files with 40 additions and 35 deletions

View File

@ -264,6 +264,9 @@ GVAR(commonPostInited) = true;
diag_log text format["[ACE] Settings received from server"];
// Event so that ACE_Modules have their settings loaded:
["InitSettingsFromModules", []] call FUNC(localEvent);
// Load user settings from profile
if (hasInterface) then {
call FUNC(loadSettingsFromProfile);

View File

@ -1,6 +1,7 @@
#include "script_component.hpp"
["InitSettingsFromModules", {
// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it.
// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution.
{
@ -42,3 +43,4 @@
};
};
}foreach GVAR(moduleInitCollection);
}] call FUNC(addEventhandler);