mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Add support for sub folder style lua modules
Ex. lua_modules/?/init.lua will work (which some lua modules do use)
This commit is contained in:
parent
d9bdcf2aec
commit
83bb10b32b
@ -852,7 +852,7 @@ void LuaParser::ReloadQuests() {
|
|||||||
lua_getglobal(L, "package");
|
lua_getglobal(L, "package");
|
||||||
lua_getfield(L, -1, "path");
|
lua_getfield(L, -1, "path");
|
||||||
std::string module_path = lua_tostring(L,-1);
|
std::string module_path = lua_tostring(L,-1);
|
||||||
module_path += ";./" + Config->LuaModuleDir + "/?.lua";
|
module_path += ";./" + Config->LuaModuleDir + "?.lua;./" + Config->LuaModuleDir + "?/init.lua";
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
lua_pushstring(L, module_path.c_str());
|
lua_pushstring(L, module_path.c_str());
|
||||||
lua_setfield(L, -2, "path");
|
lua_setfield(L, -2, "path");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user