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

clear sandbox jic it matters

This commit is contained in:
Luke aka SwissalpS 2023-06-12 00:57:07 +02:00
parent 459d59649f
commit 261592f108

View File

@ -68,6 +68,8 @@ local function autocraft(inventory, craft)
-- success, so apply to actual output inventory -- success, so apply to actual output inventory
inventory:set_list("dst", sandbox_inv:get_list("")) inventory:set_list("dst", sandbox_inv:get_list(""))
-- clear sandbox, just in case it matters
sandbox_inv:set_list("", {})
-- consume materials -- consume materials
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