forked from mtcontrib/pipeworks
add sanity check for upgrade cases of autocrafters with broken metadata (especially for can_dig)
This commit is contained in:
parent
73b3466a7b
commit
373c7951d2
@ -209,7 +209,9 @@ local function upgrade_autocrafter(pos, meta)
|
||||
-- we allready dropped stuff, so lets remove the metadatasetting (we are not being called again for this node)
|
||||
meta:set_string("virtual_items", "")
|
||||
else -- we are version 1
|
||||
for idx, stack in ipairs(inv:get_list("recipe")) do
|
||||
local recipe = inv:get_list("recipe")
|
||||
if not recipe then return end
|
||||
for idx, stack in ipairs(recipe) do
|
||||
if not stack:is_empty() then
|
||||
minetest.item_drop(stack, "", pos)
|
||||
stack:set_count(1)
|
||||
|
Loading…
Reference in New Issue
Block a user