But I didn't find any API allow me to do it. The only term I found is RailPlanner.
I can only build entities like the code below. But how can I build railway turning around?
Code: Select all
local start_position = player.position
for i = 0, 30, 1 do
local current_position = start_position
current_position.y = 1 + current_position.y
player.surface.create_entity( {
name="entity-ghost",
inner_name="straight-rail",
position = current_position,
force = game.forces.player
} )
end