Code: Select all
Failed to load mods: __SEChanges__/data-updates.lua:39: attempt to index field 'ingredients' (a nil value)
stack traceback:
__SEChanges/data-updates.lua:39: in main chunk
Mods to be disabled:
SEChanges (0.1.1) [] Reset mod settings
Code: Select all
local function config(name)
return settings.startup['sec:'.. name].value
end
local SEModPrefix = "se-"
landfill_ingredients = {
SEModPrefix .. "scrap",
"iron-ore",
"copper-ore",
SEModPrefix .. "iridium-ore",
SEModPrefix .. "holmium-ore",
SEModPrefix .. "beryllium-ore"
}
if config("landfill-ores") then
for _,ingredient in pairs(landfill_ingredients) do
Recipe = table.deepcopy(data.raw["recipe"]["landfill"])
Recipe.name = "sec:" .. Recipe.name .. "-crafting"
Recipe.category = "crafting"
if config("landfill") then
Recipe.ingredients[1] = {ingredient, Recipe.ingredients[1][2] / 5}
Recipe.result_count = Recipe.result_count * 5
end
if ingredient == landfill_ingredients[4] then
table.insert(data.raw["technology"][SEModPrefix .. "processing-iridium"].effects, {type = "unlock_recipe", recipe = Recipe.name})
elseif ingredient == landfill_ingredients[5] then
table.insert(data.raw["technology"][SEModPrefix .. "processing-holmium"].effects, {type = "unlock_recipe", recipe = Recipe.name})
elseif ingredient == landfill_ingredients[6] then
table.insert(data.raw["technology"][SEModPrefix .. "processing-beryllium"].effects, {type = "unlock_recipe", recipe = Recipe.name})
else
Recipe.enabled = true
end
end
end
if config("landfill") then
data.raw["recipe"]["landfill"].ingredients[1] = {"stone", 10}
data.raw["recipe"]["landfill-sand"].ingredients[1] = {"sand", 40}
data.raw["recipe"]["landfill"].result_count = data.raw["recipe"]["landfill"].result_count * 5
data.raw["recipe"]["landfill-sand"].result_count = data.raw["recipe"]["landfill-sand"].result_count * 5
for _,ingredient in pairs(landfill_ingredients) do
data.raw["recipe"]["landfill" .. ingredient].result_count = data.raw["recipe"]["landfill" .. ingredient].result_count * 5
data.raw["recipe"]["landfill" .. ingredient].ingredients[1][2] = data.raw["recipe"]["landfill" .. ingredient].ingredients[1][2] / 5
end
end