Skip to main content

faction_technologies

Function faction_technologies 

Source
pub fn faction_technologies(
    tables: &StartposTables,
    campaign: &str,
    faction: &FactionEntry,
) -> Result<Vec<String>>
Expand description

Returns the technologies of a faction’s tree.

The tree uses the node sets of the faction if it has any, else the ones of its subculture (for no faction), else the ones of its culture (for no faction nor subculture), looking first at the campaign’s sets and then at the ones without campaign. The sets go by technology category from the last (military before civil), then in reverse table order. Each set lists its nodes for the campaign and the faction by (tier, indent), the faction’s own node replacing the generic one of its slot, and technologies appear once.

§Arguments

  • tables - Tables with technology_node_sets and technology_nodes.
  • campaign - Campaign key.
  • faction - The faction.

§Returns

The technology keys, in tree order.

§Errors

Returns an error if a table or column is missing.