1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-05-11 05:10:22 +02:00

add warning to ensure double-check was not needed

This commit is contained in:
Luke aka SwissalpS 2023-06-15 03:50:11 +02:00
parent 061c17ce51
commit c1792bbc1b

View File

@ -200,8 +200,12 @@ local function autocraft(inventory, craft)
-- craft the result into the dst inventory and add any "replacements" as well
inventory:add_item("dst", output)
local leftover
for i = 1, 9 do
inventory:add_item("dst", craft.decremented_input.items[i])
leftover = inventory:add_item("dst", craft.decremented_input[i])
if leftover and not leftover:is_empty() then
minetest.log("warning", "[pipeworks] autocrafter didn't calculate output space correctly.")
end
end
return true
end