From: MetaDucky Date: Thu, 23 May 2013 17:27:00 +0000 (+0200) Subject: Fixed wrongly named invref:get_location() table members for nodes. X-Git-Tag: 0.4.7~14^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f62ddf9022588f6c93fe6cdf2244640dd96dc186;p=oweals%2Fminetest.git Fixed wrongly named invref:get_location() table members for nodes. Makes the result compatible with the minetest.get_inventory(location) param. --- diff --git a/src/script/lua_api/l_inventory.cpp b/src/script/lua_api/l_inventory.cpp index 884b33e67..6dfb7a28c 100644 --- a/src/script/lua_api/l_inventory.cpp +++ b/src/script/lua_api/l_inventory.cpp @@ -306,10 +306,10 @@ int InvRef::l_get_location(lua_State *L) return 1; case InventoryLocation::NODEMETA: lua_newtable(L); - lua_pushstring(L, "nodemeta"); + lua_pushstring(L, "node"); lua_setfield(L, -2, "type"); push_v3s16(L, loc.p); - lua_setfield(L, -2, "name"); + lua_setfield(L, -2, "pos"); return 1; case InventoryLocation::DETACHED: lua_newtable(L);