pub fn available_chains(
tables: &StartposTables,
campaign: &str,
faction: &FactionEntry,
) -> Result<Option<HashSet<String>>>Expand description
Returns the building chains available to a faction.
The chains are the ones of the availability sets of the faction’s rows if it has any, else of its subculture’s (rows without faction), else of its culture’s (rows without faction nor subculture), looking first at the campaign’s rows and then at the ones without campaign. The rows without culture, subculture nor faction add their sets to every faction.
§Arguments
tables- Tables withbuilding_chain_availabilitiesandbuilding_chain_availability_sets.campaign- Campaign key.faction- The faction.
§Returns
The chain keys, or None if the tables don’t restrict chains.
§Errors
Returns an error if a column is missing.