Skip to content

Commit 3bece9c

Browse files
committed
Fix incorrect recipe registration for craftguide and i3
1 parent 59643c4 commit 3bece9c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

technic/machines/register/recipes.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ function technic.register_recipe_type(typename, origdata)
3232
end
3333

3434
local function get_recipe_index(items)
35-
if not items or type(items) ~= "table" then return false end
35+
if type(items) ~= "table" then
36+
return false
37+
end
38+
3639
local l = {}
3740
for i, stack in ipairs(items) do
3841
l[i] = ItemStack(stack):get_name()
@@ -75,22 +78,21 @@ local function register_recipe(typename, data)
7578
end
7679
if (have_cg or have_i3) and technic.recipes[typename].output_size == 1 then
7780
local result = data.output
78-
if (type(result)=="table") then
81+
if type(result) == "table" then
7982
result = result[1]
8083
end
81-
local items = table.concat(data.input, ", ")
8284
if have_cg and craftguide.register_craft then
8385
craftguide.register_craft({
8486
type = typename,
8587
result = result,
86-
items = {items},
88+
items = data.input,
8789
})
8890
end
8991
if have_i3 then
9092
i3.register_craft({
9193
type = typename,
9294
result = result,
93-
items = {items},
95+
items = data.input,
9496
})
9597
end
9698
end

0 commit comments

Comments
 (0)