mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-24 09:50:31 +01:00
Wrench: when restoring picked_up_<item> to <item>, preserve rotation
This commit is contained in:
parent
ab6f2b2556
commit
78bfa4f893
@ -36,10 +36,11 @@ end
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user