Skip to main content

legacies

Function legacies 

Source
pub fn legacies(
    tables: &StartposTables,
    index: &CampaignIndex,
    faction: &FactionEntry,
    forces: &[LegacyForce],
    overrides: &HashSet<String>,
) -> Result<Vec<Legacy>>
Expand description

Returns the legacies of a faction’s forces.

§Arguments

  • tables - Tables with military_force_legacy_names and military_force_legacy_emblems.
  • index - The campaign’s startpos rows.
  • faction - The faction.
  • forces - The faction’s forces, in startpos order.
  • overrides - start_pos_characters ids of the characters with a legacy_override text (a localised column, so it comes from the campaign’s localisation, not from the table).

§Returns

One legacy per force, in the same order.

§Errors

Returns an error if a table or column is missing.