Skip to main content

government_posts

Function government_posts 

Source
pub fn government_posts(
    tables: &StartposTables,
    index: &CampaignIndex,
    faction: &FactionEntry,
) -> Result<Vec<PostGroup>>
Expand description

Returns the post groups of a faction’s government.

The groups are the ministerial_positions_culture_details rows for the faction’s culture (without subculture and faction), its subculture (without faction) and the faction itself: the campaign’s rows if it has any for the faction, else the rows without campaign.

§Arguments

  • tables - Tables with ministerial_positions_culture_details and ministerial_positions.
  • index - The campaign’s startpos rows.
  • faction - The faction.

§Returns

The post groups, in table order.

§Errors

Returns an error if a table or column is missing.