Skip to main content

write_provinces

Function write_provinces 

Source
pub fn write_provinces(
    layout: &StartposLayout,
    plan: &CaiPlan,
    world: &WorldView,
    map_regions: &[MapRegion],
    index: &CampaignIndex,
) -> Result<(RecordNode, RecordNode)>
Expand description

Writes the provinces list and the list of the factions’ parts of them.

§Arguments

  • layout - Record layouts.
  • plan - Component ids.
  • world - The world’s objects.
  • map_regions - Regions of the map, in map order.
  • index - The campaign’s startpos rows, to find each province’s major settlement.

§Returns

The provinces list and the factions’ parts list.

§Errors

Returns an error if the layout lacks the records.