mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 16:57:57 +03:00
Load "package" lib and make package.path point to the scripts folder.
This commit is contained in:
parent
517d98774d
commit
31a218f26a
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ ScriptInterfaceStringsHandler* ScriptInterfaceState::CreateStringsHandler()
|
||||||
|
|
||||||
void ScriptInterfaceState::Init()
|
void ScriptInterfaceState::Init()
|
||||||
{
|
{
|
||||||
s_solState.open_libraries(sol::lib::base, sol::lib::math);
|
s_solState.open_libraries(sol::lib::base, sol::lib::math, sol::lib::package);
|
||||||
|
s_solState.script("package.path=\"Scripts/?.lua\"");
|
||||||
s_solState.set_exception_handler(lua_exception_handler);
|
s_solState.set_exception_handler(lua_exception_handler);
|
||||||
|
|
||||||
s_rootTable = sol::table{ s_solState.lua_state(), sol::create };
|
s_rootTable = sol::table{ s_solState.lua_state(), sol::create };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue