1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

Let core.get_mod_storage be called multiple times (#12572)

This commit is contained in:
Jude Melton-Houghton
2022-07-23 16:27:07 -04:00
committed by GitHub
parent 2351c95612
commit d631f21024
4 changed files with 23 additions and 6 deletions

View File

@@ -25,12 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int ModApiStorage::l_get_mod_storage(lua_State *L)
{
lua_rawgeti(L, LUA_REGISTRYINDEX, CUSTOM_RIDX_CURRENT_MOD_NAME);
if (!lua_isstring(L, -1)) {
return 0;
}
std::string mod_name = readParam<std::string>(L, -1);
// Note that this is wrapped in Lua, see builtin/common/mod_storage.lua
std::string mod_name = readParam<std::string>(L, 1);
ModMetadata *store = nullptr;