Skip to content

Commit

Permalink
Fixed wrongly named invref:get_location() table members for nodes.
Browse files Browse the repository at this point in the history
Makes the result compatible with the minetest.get_inventory(location) param.
  • Loading branch information
MetaDucky authored and kahrl committed May 25, 2013
1 parent 96fe1de commit f62ddf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/lua_api/l_inventory.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit f62ddf9

Please sign in to comment.