mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Let core.get_mod_storage be called multiple times (#12572)
This commit is contained in:
parent
2351c95612
commit
d631f21024
4 changed files with 23 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue