mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Add shared mods path to get_modpaths
...because the documentation implies it should be.
This commit is contained in:
parent
b0ad9a6c33
commit
1fb49e9ca7
@ -675,6 +675,11 @@ int ModApiMainMenu::l_get_modpaths(lua_State *L)
|
||||
ModApiMainMenu::l_get_modpath(L);
|
||||
lua_setfield(L, -2, "mods");
|
||||
|
||||
std::string modpath = fs::RemoveRelativePathComponents(
|
||||
porting::path_share + DIR_DELIM + "mods" + DIR_DELIM);
|
||||
lua_pushstring(L, modpath.c_str());
|
||||
lua_setfield(L, -2, "share");
|
||||
|
||||
for (const std::string &component : getEnvModPaths()) {
|
||||
lua_pushstring(L, component.c_str());
|
||||
lua_setfield(L, -2, fs::AbsolutePath(component).c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user