Circuit Processing


A mod for Bob's mods. Reintroduces green to red to blue circuit progression. New circuits result in overall increased resource usage. Reduces module count and types.

Tweaks
1 year, 10 months ago
0.15 - 1.1
83.0K

b Nil result

6 years ago

Your function

local function replaceingredients(ingredients)
for _,ingredient in pairs(ingredients) do
local nameidx = 1
if ingredient.name then nameidx = 'name' end
local r = replaceingredient[ingredient[nameidx]]
if r then
ingredient[nameidx] = r
end
end
end

goes error if there is no ingredients, add check so that it is

local function replaceingredients(ingredients)
if ingredients then
for _,ingredient in pairs(ingredients) do
local nameidx = 1
if ingredient.name then nameidx = 'name' end
local r = replaceingredient[ingredient[nameidx]]
if r then
ingredient[nameidx] = r
end
end
end
end

New response