summaryrefslogtreecommitdiff
path: root/wrench
diff options
context:
space:
mode:
authorRogier <rogier777@gmail.com>2015-03-11 17:23:28 +0100
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-03-11 18:10:16 -0400
commit78bfa4f893ef577332b11ba199b980b836ad0879 (patch)
tree61156b1974b47d384347def453ad94efe21710a6 /wrench
parentab6f2b2556f42e965494e6db82eeb969a7ffe924 (diff)
Wrench: when restoring picked_up_<item> to <item>, preserve rotation
Diffstat (limited to 'wrench')
-rw-r--r--wrench/init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/wrench/init.lua b/wrench/init.lua
index fbe1e10..6e0e66d 100644
--- a/wrench/init.lua
+++ b/wrench/init.lua
@@ -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)