Code: Select all
-- item.lua
local TrainStop = table.deepcopy(data.raw["train-stop"]["train-stop"])
TrainStop.name = "train-stop-alt"
--TrainStop.default_id_signal = {type = "virtual", name = "signal-S"}
local TrainStopRecipe = table.deepcopy(data.raw.recipe["train-stop"])
TrainStopRecipe.result = "train-stop-alt"
data:extend{TrainStop, TrainStopRecipe}
2nd question: How can i extend a well-kown data type like "train-stop"? I need an additional property named like above.1.414 Error ModManager.cpp:957: Error in assignID, item with name 'train-stop-alt' does not exist.
Source: train-stop (recipe).
1.604 Loaded shader file D:/Steam/steamapps/common/Factorio/data/core/graphics/shaders/game.glsl
1.605 Loaded shader file D:/Steam/steamapps/common/Factorio/data/core/graphics/shaders/zoom-to-world.glsl
1.612 Initial atlas bitmap size is 4096
1.612 Created atlas bitmap 192x5
1.612 Created atlas bitmap 132x24
1.759 Sprites loaded
1.759 Convert atlas 132x24 to: trilinear-filtering
1.769 Custom inputs active: 0
1.780 Factorio initialised
1.781 Mods to disable:Fehler beim Laden der Mods: Error in assignID, item with name 'train-stop-alt' does not exist.
I've searched the forum and the wiki for the error message, but there are no hints. I've used the fire-armor-tutorial as base for my first step to get into the lua-coding of modifications.
Any help is appreciated.