However, if I do the commented code below, I get no such errors. Am I missing something very simple here?
Code: Select all
local entry = {
type = "technology",
name = "test",
icon = "__test__/graphics/icons/test.png",
effects = { type = "unlock-recipe", recipe = "testRecipe" },
unit = {
count = 20,
ingredients = { {"science-pack-1", 1}, {"science-pack-2", 1}, {"science-pack-3", 1} },
time = 5
},
--order = "x-x",
prerequisites = {"automation-2", "advanced-electronics", "logistics-2"}
}
-- local entry = util.table.deepcopy(data.raw["technology"]["automation"])
-- entry.name = "test"
-- entry.icon = "__test__/graphics/icons/test.png"
-- entry.effects = {{ type = "unlock-recipe", recipe = "testRecipe" }}
-- entry.prerequisites = {"automation-2", "advanced-electronics", "logistics-2"}
data.raw[entry.type][entry.name] = entry