To replicate the bug, create a curved belt similar to the screenshot and then run the following lua snippet:
Or run the snippet after loading the attached scenario and (make sure time isn't paused!)
Code: Select all
local surface = game.player.surface
local entities = surface.find_entities_filtered{area = area, name = "underground-belt"}
for _, thing in pairs(entities) do
i = 1
--for i=1, thing.get_max_transport_line_index() do
local tl = thing.get_transport_line(i)
local pos = tl.get_line_item_position(tl.line_length)
surface.print(i .. ": [" .. "gps=" .. pos.x .. "," .. pos.y .. "]")
--end --lines
break
end --belts