pub struct Query { /* private fields */ }
Implementations
sourceimpl Query
impl Query
pub fn from_save(save: Eu4Save) -> Self
pub fn save(&self) -> &Eu4Save
pub fn countries(&self) -> impl Iterator<Item = SaveCountry<'_>> + '_
pub fn save_country(&self, tag: &CountryTag) -> Option<SaveCountry<'_>>
pub fn country(&self, tag: &CountryTag) -> Option<&Country>
sourcepub fn players(&self) -> Vec<Player>
pub fn players(&self) -> Vec<Player>
Returns a set of the names of the players who participated in a playthrough. May be blank for single player run through where the player is detected as “Player”. No guarantees are given as to the state of each player’s country. Annexed countries may still show the original player. It is undefined what happens to players when a formable nation is annexed and then reformed by another player.
sourcepub fn player_histories(
&self,
nation_events: &[NationEvents]
) -> Vec<PlayerHistory>
pub fn player_histories(
&self,
nation_events: &[NationEvents]
) -> Vec<PlayerHistory>
Provides a rich structure that contains the following:
- A list countries that had a player at one point or another
- What country the player is playing
- Whether that player is currently in the session
- The names of the players in the session
- A list of all prior tags that country had been
sourcepub fn nation_events(
&self,
province_owners: &ProvinceOwners
) -> Vec<NationEvents>
pub fn nation_events(
&self,
province_owners: &ProvinceOwners
) -> Vec<NationEvents>
Calculates the major events that befell countries (annexations, appearances, and tag switches)
sourcepub fn province_owners(&self) -> ProvinceOwners
pub fn province_owners(&self) -> ProvinceOwners
Aggregate when lands changed hands
pub fn province_religions(&self, lookup: &ReligionLookup) -> ProvinceReligions
pub fn religion_lookup(&self) -> ReligionLookup
sourcepub fn starting_country(&self, histories: &[PlayerHistory]) -> Option<CountryTag>
pub fn starting_country(&self, histories: &[PlayerHistory]) -> Option<CountryTag>
Return the starting country in single player playthroughs. If playing in multiplayer or if the starting country can’t be determined then none is returned.
pub fn tag_resolver(&self, nation_events: &[NationEvents]) -> TagResolver
pub fn inherit(&self, country: &SaveCountry<'_>) -> Inheritance
pub fn resolved_war_participants(
&self,
tag_resolver: &TagResolver
) -> Vec<ResolvedWarParticipants>
pub fn income_statistics_ledger(&self, nation: &NationEvents) -> Vec<LedgerPoint>
pub fn inflation_statistics_ledger(
&self,
nation: &NationEvents
) -> Vec<LedgerPoint>
pub fn score_statistics_ledger(&self, nation: &NationEvents) -> Vec<LedgerPoint>
pub fn nation_size_statistics_ledger(
&self,
nation: &NationEvents
) -> Vec<LedgerPoint>
pub fn country_tag_hex_color(&self, country_tag: &CountryTag) -> Option<String>
pub fn country_color_to_hex(&self, country: &Country) -> String
pub fn country_income_breakdown(&self, country: &Country) -> CountryIncomeLedger
pub fn countries_income_breakdown(
&self
) -> HashMap<CountryTag, CountryIncomeLedger>
pub fn countries_expense_breakdown(
&self
) -> HashMap<CountryTag, CountryExpenseLedger>
pub fn countries_total_expense_breakdown(
&self
) -> HashMap<CountryTag, CountryExpenseLedger>
pub fn country_expense_breakdown(
&self,
country: &Country
) -> CountryExpenseLedger
pub fn country_total_expense_breakdown(
&self,
country: &Country
) -> CountryExpenseLedger
pub fn country_mana_breakdown(&self, country: &Country) -> CountryManaUsage
sourcepub fn built_buildings(&self) -> &HashSet<String>
pub fn built_buildings(&self) -> &HashSet<String>
Return all unique buildings in the world that are built