1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-25 02:10:23 +01:00

allow moving virtual items within the crafting grid

This commit is contained in:
Tim 2015-01-28 00:42:22 +01:00
parent e92ac0f7b3
commit 3a46c1266a

View File

@ -247,16 +247,18 @@ minetest.register_node("pipeworks:autocrafter", {
stack:set_count(count)
if from_list == "recipe" then
inv:set_stack(from_list, from_index, ItemStack(""))
after_recipe_change(pos, inv)
return 0
elseif to_list == "recipe" then
add_virtual_item(inv, to_list, to_index, stack)
after_recipe_change(pos, inv)
return 0
else
after_inventory_change(pos, inv)
return stack:get_count()
end
if to_list == "recipe" then
add_virtual_item(inv, to_list, to_index, stack)
end
if from_list == "recipe" or to_list == "recipe" then
after_recipe_change(pos, inv)
return 0
end
after_inventory_change(pos, inv)
return stack:get_count()
end,
on_timer = run_autocrafter
})