1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-30 07:10:45 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
2021-02-07 13:13:20 +01:00
19 changed files with 74 additions and 80 deletions

View File

@ -47,7 +47,7 @@ local function autocraft(inventory, craft)
end
-- consume material
for itemname, number in pairs(consumption) do
for i = 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
inventory:remove_item("src", ItemStack(itemname))
end
end
@ -76,7 +76,7 @@ local function run_autocrafter(pos, elapsed)
return false
end
for step = 1, math.floor(elapsed/craft_time) do
for _ = 1, math.floor(elapsed/craft_time) do
local continue = autocraft(inventory, craft)
if not continue then return false end
end
@ -109,7 +109,6 @@ local function after_recipe_change(pos, inventory)
inventory:set_stack("output", 1, "")
return
end
local recipe_changed = false
local recipe = inventory:get_list("recipe")
local hash = minetest.hash_node_position(pos)