Wrench: when restoring picked_up_<item> to <item>, preserve rotation
| | |
| | | |
| | | local function restore(pos, placer, itemstack) |
| | | local name = itemstack:get_name() |
| | | local node = minetest.get_node(pos) |
| | | local meta = minetest.get_meta(pos) |
| | | local inv = meta:get_inventory() |
| | | local data = minetest.deserialize(itemstack:get_metadata()) |
| | | minetest.set_node(pos, {name = data.name}) |
| | | minetest.set_node(pos, {name = data.name, param2 = node.param2}) |
| | | local lists = data.lists |
| | | for listname, list in pairs(lists) do |
| | | inv:set_list(listname, list) |