mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-30 17:37:32 +01:00
Wrench: fix restore of furnace (contents were not restored)
This commit is contained in:
parent
78bfa4f893
commit
4874e29025
@ -42,9 +42,6 @@ local function restore(pos, placer, itemstack)
|
|||||||
local data = minetest.deserialize(itemstack:get_metadata())
|
local data = minetest.deserialize(itemstack:get_metadata())
|
||||||
minetest.set_node(pos, {name = data.name, param2 = node.param2})
|
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
|
|
||||||
inv:set_list(listname, list)
|
|
||||||
end
|
|
||||||
for name, value in pairs(data.metas) do
|
for name, value in pairs(data.metas) do
|
||||||
local meta_type = get_meta_type(data.name, name)
|
local meta_type = get_meta_type(data.name, name)
|
||||||
if meta_type == wrench.META_TYPE_INT then
|
if meta_type == wrench.META_TYPE_INT then
|
||||||
@ -55,6 +52,9 @@ local function restore(pos, placer, itemstack)
|
|||||||
meta:set_string(name, value)
|
meta:set_string(name, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
for listname, list in pairs(lists) do
|
||||||
|
inv:set_list(listname, list)
|
||||||
|
end
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user