Fixed wrongly named invref:get_location() table members for nodes.

Makes the result compatible with the minetest.get_inventory(location) param.
This commit is contained in:
MetaDucky 2013-05-23 19:27:00 +02:00 committed by Kahrl
parent 96fe1de832
commit f62ddf9022
1 changed files with 2 additions and 2 deletions

View File

@ -306,10 +306,10 @@ int InvRef::l_get_location(lua_State *L)
return 1; return 1;
case InventoryLocation::NODEMETA: case InventoryLocation::NODEMETA:
lua_newtable(L); lua_newtable(L);
lua_pushstring(L, "nodemeta"); lua_pushstring(L, "node");
lua_setfield(L, -2, "type"); lua_setfield(L, -2, "type");
push_v3s16(L, loc.p); push_v3s16(L, loc.p);
lua_setfield(L, -2, "name"); lua_setfield(L, -2, "pos");
return 1; return 1;
case InventoryLocation::DETACHED: case InventoryLocation::DETACHED:
lua_newtable(L); lua_newtable(L);