mirror of
https://github.com/minetest-mods/technic.git
synced 2024-08-20 13:34:12 +02: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 function restore(pos, placer, itemstack)
|
||||||
local name = itemstack:get_name()
|
local name = itemstack:get_name()
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local data = minetest.deserialize(itemstack:get_metadata())
|
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
|
local lists = data.lists
|
||||||
for listname, list in pairs(lists) do
|
for listname, list in pairs(lists) do
|
||||||
inv:set_list(listname, list)
|
inv:set_list(listname, list)
|
||||||
|
Loading…
Reference in New Issue
Block a user