mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
SAPI: Mark all Lua API functions requiring envlock
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user