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

remove double-check of available materials

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

View File

@ -191,9 +191,6 @@ local function autocraft(inventory, craft)
return false return false
end end
for itemname, number in pairs(consumption) do
if (not inv_index[itemname]) or inv_index[itemname] < number then return false end
end
-- consume material -- consume material
for itemname, number in pairs(consumption) do for itemname, number in pairs(consumption) do
for _ = 1, number do -- We have to do that since remove_item does not work if count > stack_max for _ = 1, number do -- We have to do that since remove_item does not work if count > stack_max