pub fn write_trade_routes(
layout: &StartposLayout,
plan: &CaiPlan,
world: &WorldView,
routes: &[(u32, u32)],
) -> Result<RecordNode>Expand description
Writes the international trade routes list: one per route, in route id order, with its owner and the owner of the other route of its agreement (routes come in pairs, one per side: 1 and 2, 3 and 4…).
§Arguments
layout- Record layouts.plan- Component ids.world- The world’s objects.routes- Each route’s owner faction (runtime id) and route id.
§Errors
Returns an error if the layout lacks the records.