Updated module loading to use a common lua state that has openspace lua functions (closing #100)

This commit is contained in:
Alexander Bock
2015-02-24 13:55:43 +01:00
parent c0d1d9f564
commit c571450dc2
3 changed files with 10 additions and 8 deletions

View File

@@ -470,8 +470,8 @@ void ScriptEngine::remapPrintFunction() {
void ScriptEngine::initializeLuaState(lua_State* state) {
LDEBUG("Create openspace base library");
lua_newtable(_state);
lua_setglobal(_state, _openspaceLibraryName.c_str());
lua_newtable(state);
lua_setglobal(state, _openspaceLibraryName.c_str());
LDEBUG("Add OpenSpace modules");
for (const LuaLibrary& lib : _registeredLibraries)