Fix issue #182 (TA4 autocrafter recipe)

This commit is contained in:
Joachim Stolberg 2025-01-10 19:31:21 +01:00
parent 1bf0a4c175
commit fcb583c062

View File

@ -242,7 +242,8 @@ local function determine_recipe_items(pos, input)
local num, idx
if input and type(input) == "string" then -- Lua controller
-- Test if "<node-number>.<recipe-number>" input
-- Test if "<node-number>.<recipe-number>"
if string.find(input, "%d+%.%d+") then
num, idx = unpack(string.split(input, ".", false, 1))
elseif input and type(input) == "table" then -- Beduino
if input[3] == 0 then -- TA3 Terminal Basic
@ -253,10 +254,11 @@ local function determine_recipe_items(pos, input)
idx = tostring(input[3])
end
end
if num and idx then
input = get_input_from_recipeblock(pos, num, idx)
if input then
end
end
if input and type(input) == "string" then
-- "<item>,<item>,..." input
local items = string.split(input, ",", true, 8)
if items and type(items) == "table" and next(items) then
@ -264,7 +266,6 @@ local function determine_recipe_items(pos, input)
end
end
end
end
local function on_new_recipe(pos, input)
local items = determine_recipe_items(pos, input)