Code: Select all
-- copying the default modules
local op_speed_module = table.deepcopy(data.raw.module["speed-module"])
local op_production_module = table.deepcopy(data.raw.module["production-module"])
local op_effectivity_module = table.deepcopy(data.raw.module["effectivity-module"])
op_speed_module.name = "op-speed-module"
op_speed_module.type = "prototype.module"
op_speed_module.stacksize = 100
op_speed_module.icons = {
{
icon = op_speed_module.icon,
tint = {r=0,g=0,b=0,a=0.3}
},
}
-- the category for the module (spped, productivity or effectivity)
op_speed_module.category = "speed"
-- the effects for the module
op_speed_module.effect = {
{
speed = 100,
productivity = 0,
pollution = 50
consumption = -50,
}
}
local op_speed_module_recipe = table.deepcopy(data.raw.module["speed-module"])
op_speed_module_recipe.name = "op-speed-module-1"
op_speed_module_recipe.ingredients = {
{"speed-module", 1},
{"advanced-circuit", 20},
{"processing-unit", 10},
{"steel-plate", 150},
}
op_speed_module_recipe.result = "op-speed-module"
data:extend(op_speed_module, op_speed_module_recipe)
Factorio gives me an error saying that it's missing a '}'