I wanted to connect 2 logistic networks by script to make long routes (instead of placing invisible uncollidable roboports or making the logistics_connection_distance very big).
I was wondering if this could be achieved by allowing a roboport's LuaEntity.logistic_network to be writable. On write, write the same logistic_network to all non robot entities inside the logistic supply radius (I'm unsure if the roboport keeps track of the bots it's sent, I don't think so). Though the logic for merging networks should be already done I think.
Though the roboport and the logistic_network being written would have to be the same surface.
I don't know if that means it should instead belong to LuaSurface and be something like:
merge_logistic_networks(source, destination)
Marks two logistic networks to be merged together. All entities in the source network will be reassigned to the target network. The source network will then be destroyed.
This also allows for configurations which are currently impossible (like 4 networks in an ✳ shape that are able to "cross" each other without auto-merging, and tough the centre is not part of the networks, the routes would cross it) and doesn't have the typical problems with overlapping networks.
Allow connecting logistic networks by script.
Re: Allow connecting logistic networks by script.
Just to clarify, upon writing to one roboport, this write would propagate to the roboports it's connected to (so it behaves like placing a bridge roboport between 2 networks currently does).
