mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-12 06:30:09 -06:00
Rearranged profile initializations and verified that all init correctly
This commit is contained in:
@@ -164,29 +164,6 @@ ghoul::systemcapabilities::Version ModuleEngine::requiredOpenGLVersion() const {
|
||||
return version;
|
||||
}
|
||||
|
||||
void ModuleEngine::setFromProfile_modules(const Profile& p)
|
||||
{
|
||||
for (Profile::Module mod : p.modules) {
|
||||
const std::vector<OpenSpaceModule*>& m = modules();
|
||||
if (std::find(m.begin(), m.end(), mod.name) != m.end()) {
|
||||
if (mod.loadedInstruction.has_value()) {
|
||||
global::scriptEngine->queueScript(
|
||||
mod.loadedInstruction.value(),
|
||||
scripting::ScriptEngine::RemoteScripting::Yes
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mod.notLoadedInstruction.has_value()) {
|
||||
global::scriptEngine->queueScript(
|
||||
mod.notLoadedInstruction.value(),
|
||||
scripting::ScriptEngine::RemoteScripting::Yes
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scripting::LuaLibrary ModuleEngine::luaLibrary() {
|
||||
return {
|
||||
"modules",
|
||||
|
||||
Reference in New Issue
Block a user