I tried this:
Code: Select all
for line_index = 1, entity.get_max_transport_line_index() do
local source = entity.get_transport_line(line_index)
local dest = target.get_transport_line(line_index)
for item_index = 1, #source do
dest.insert_at_back(source[item_index])
end
source.clear()
end
and the destination belt reports true for dest.can_insert_at_back() before the first entity. The first entity copies over ok but now "can_insert_at_back" is false. So it only ever copies one (the first) entity.
For both, source and destination, the line length is shown as "1" in the debugger, which is weird as the source line clearly has five entities. What am I doing wrong?