diff options
author | Rogier <rogier777@gmail.com> | 2015-03-11 18:17:53 +0100 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-03-11 18:10:16 -0400 |
commit | 4874e290256c195d2abebf406797aaa2bf42582a (patch) | |
tree | d6c49de969d627d8398c88cc20c0b9d8979440e7 /wrench | |
parent | 78bfa4f893ef577332b11ba199b980b836ad0879 (diff) |
Wrench: fix restore of furnace (contents were not restored)
Diffstat (limited to 'wrench')
-rw-r--r-- | wrench/init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wrench/init.lua b/wrench/init.lua index 6e0e66d..76605c4 100644 --- a/wrench/init.lua +++ b/wrench/init.lua @@ -42,9 +42,6 @@ local function restore(pos, placer, itemstack) local data = minetest.deserialize(itemstack:get_metadata()) 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) - end for name, value in pairs(data.metas) do local meta_type = get_meta_type(data.name, name) if meta_type == wrench.META_TYPE_INT then @@ -55,6 +52,9 @@ local function restore(pos, placer, itemstack) meta:set_string(name, value) end end + for listname, list in pairs(lists) do + inv:set_list(listname, list) + end itemstack:take_item() return itemstack end |