mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
SAPI: Mark all Lua API functions requiring envlock
This commit is contained in:
parent
3936a5e3f7
commit
54f1267c2c
13 changed files with 141 additions and 37 deletions
|
@ -491,6 +491,7 @@ int ModApiInventory::l_get_inventory(lua_State *L)
|
|||
std::string type = checkstringfield(L, 1, "type");
|
||||
|
||||
if(type == "node"){
|
||||
MAP_LOCK_REQUIRED;
|
||||
lua_getfield(L, 1, "pos");
|
||||
v3s16 pos = check_v3s16(L, -1);
|
||||
loc.setNodeMeta(pos);
|
||||
|
@ -514,7 +515,7 @@ int ModApiInventory::l_get_inventory(lua_State *L)
|
|||
InvRef::create(L, loc);
|
||||
else
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
return 1;
|
||||
// END NO_MAP_LOCK_REQUIRED;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue