mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
reduce stacksizes and wear of virtual items on update instead of leaving the previous configuration in
This commit is contained in:
parent
d3110a9e20
commit
827d049789
@ -85,8 +85,11 @@ local function update_autocrafter(pos)
|
||||
if meta:get_string("virtual_items") == "" then
|
||||
meta:set_string("virtual_items", "1")
|
||||
local inv = meta:get_inventory()
|
||||
for _, stack in ipairs(inv:get_list("recipe")) do
|
||||
for idx, stack in ipairs(inv:get_list("recipe")) do
|
||||
minetest.item_drop(stack, "", pos)
|
||||
stack:set_count(1)
|
||||
stack:set_wear(0)
|
||||
inv:set_stack("recipe", idx, stack)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user