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, 3 months ago
0.15 - 1.1
74.1K

b Nil result

5 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