MCPcopy Create free account
hub / github.com/OpenMW/openmw / newInternalLibEnvironment

Method newInternalLibEnvironment

components/lua/luastate.cpp:385–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384
385 sol::environment LuaState::newInternalLibEnvironment()
386 {
387 // TODO
388 sol::environment env(mSol, sol::create, mSandboxEnv);
389 sol::table loaded(mSol, sol::create);
390 for (const std::string& s : safePackages)
391 loaded[s] = static_cast<sol::object>(mSandboxEnv[s]);
392 env["require"] = mSol["requireGen"](env, loaded, mSol["loadInternalLib"]);
393 return env;
394 }
395
396 sol::protected_function_result LuaState::throwIfError(sol::protected_function_result&& res)
397 {

Callers 1

loadContentConstructorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected