summaryrefslogtreecommitdiff
path: root/wrench/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'wrench/init.lua')
-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)