Does your screenshot contain a join between two separate economies?
No, there´s also a road connection out of sight. But it´s much longer, that´s why wares are sent through the ferry (the warehouse is in the north). The builder and the carriers for the southern roads used the land route though, as they should.
Going back to the topic, I haven't thought that economies in Widelands will cause so many problems. I thought that working ports and ships are enough to introduce ware transportation via ferries. You can just make two separate (but very similar) functions to path finding: one for ware and second for worker. Ware path finding will include ferries and waterways, but worker path finding will not. That would be simple, but will include going through the whole code.
The pathfinder already works like this: Waterways are treated exactly like roads when routing wares, and excluded when routing workers. This was a fairly trivial change actually.
But economies are mainly responsible for handling supplies and requests. Whenever a building needs a
Worker, it registers a
Request at its
Economy then looks for a
Supply and sends it to the building that issued the
Request. The problematic assumption here is that all
Supplies can reach all
Flags belonging to their
Economy. I don´t know how it is implemented – perhaps it would be possible to exclude
WorkerSupplies from consideration if they are not reachable from the destination; but this is an essential and very stable part of the code, so I´m reluctant to change it…