mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-05-10 20:50:22 +02:00
new craft format: decremented_input
craft.decremented_input now only holds the items. Extra parameters are dropped
This commit is contained in:
parent
1aaeb9e287
commit
978b5c723e
@ -67,7 +67,6 @@ local function get_craft(pos, inventory, hash)
|
||||
local craft = autocrafterCache[hash]
|
||||
if craft then return craft end
|
||||
|
||||
craft = {recipe = recipe, consumption=count_index(recipe), output = output, decremented_input = decremented_input}
|
||||
local example_recipe = inventory:get_list("recipe")
|
||||
local output, decremented_input = minetest.get_craft_result({
|
||||
method = "normal", width = 3, items = example_recipe
|
||||
@ -77,6 +76,13 @@ local function get_craft(pos, inventory, hash)
|
||||
if output and not output.item:is_empty() then
|
||||
recipe = get_matching_craft(output.item:get_name(), example_recipe)
|
||||
end
|
||||
|
||||
craft = {
|
||||
recipe = recipe,
|
||||
consumption = count_index(recipe),
|
||||
output = output,
|
||||
decremented_input = decremented_input.items
|
||||
}
|
||||
autocrafterCache[hash] = craft
|
||||
return craft
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user