Code: Select all
local recipe = table.deepcopy(data.raw.recipe["rail"])
recipe.enabled = true
recipe.name = "tram-rail"
recipe.ingredients = {{"iron-plate",1}}
recipe.result = "tram-rail"
local tramRail = table.deepcopy(data.raw["rail-planner"]["rail"])
tramRail.name = "tram-rail"
tramRail.straight_rail = "tram-rail-straight"
local tramRailStraight = table.deepcopy(data.raw["straight-rail"]["straight-rail"])
tramRailStraight.name = "tram-rail-straight"
tramRailStraight.order = "a"
data:extend{tramRail,recipe,tramRailStraight}