Project Alice
Loading...
Searching...
No Matches
nations.cpp File Reference
#include "nations.hpp"
#include "nations_templates.hpp"
#include "dcon_generated.hpp"
#include "demographics.hpp"
#include "modifiers.hpp"
#include "politics.hpp"
#include "system_state.hpp"
#include "ve_scalar_extensions.hpp"
#include "triggers.hpp"
#include "events.hpp"
#include "prng.hpp"
#include "effects.hpp"
#include "province_templates.hpp"
#include "rebels.hpp"
Include dependency graph for nations.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  nations
 
namespace  nations::influence
 

Functions

int32_t nations::influence::get_level (sys::state &state, dcon::nation_id gp, dcon::nation_id target)
 
template auto nations::primary_culture_group< ve::tagged_vector< dcon::nation_id > > (sys::state const &, ve::tagged_vector< dcon::nation_id >)
 
template auto nations::owner_of_pop< ve::tagged_vector< dcon::pop_id > > (sys::state const &, ve::tagged_vector< dcon::pop_id >)
 
template auto nations::central_blockaded_fraction< ve::tagged_vector< dcon::nation_id > > (sys::state const &, ve::tagged_vector< dcon::nation_id >)
 
template auto nations::central_reb_controlled_fraction< ve::tagged_vector< dcon::nation_id > > (sys::state const &, ve::tagged_vector< dcon::nation_id >)
 
template auto nations::central_has_crime_fraction< ve::tagged_vector< dcon::nation_id > > (sys::state const &, ve::tagged_vector< dcon::nation_id >)
 
template auto nations::occupied_provinces_fraction< ve::tagged_vector< dcon::nation_id > > (sys::state const &, ve::tagged_vector< dcon::nation_id >)
 
int64_t nations::get_monthly_pop_increase_of_nation (sys::state &state, dcon::nation_id n)
 
dcon::nation_id nations::get_nth_great_power (sys::state const &state, uint16_t n)
 
dcon::nation_id nations::owner_of_pop (sys::state const &state, dcon::pop_id pop_ids)
 
void nations::restore_state_instances (sys::state &state)
 
void nations::restore_cached_values (sys::state &state)
 
void nations::update_cached_values (sys::state &state)
 
void nations::restore_unsaved_values (sys::state &state)
 
void nations::generate_initial_state_instances (sys::state &state)
 
bool nations::can_release_as_vassal (sys::state const &state, dcon::nation_id n, dcon::national_identity_id releasable)
 
bool nations::identity_has_holder (sys::state const &state, dcon::national_identity_id ident)
 
bool nations::are_allied (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
bool nations::is_landlocked (sys::state &state, dcon::nation_id n)
 
dcon::nation_id nations::get_relationship_partner (sys::state const &state, dcon::diplomatic_relation_id rel_id, dcon::nation_id query)
 
dcon::text_key nations::name_from_tag (sys::state &state, dcon::national_identity_id tag)
 
void nations::update_administrative_efficiency (sys::state &state)
 
float nations::daily_research_points (sys::state &state, dcon::nation_id n)
 
void nations::update_research_points (sys::state &state)
 
float nations::get_foreign_investment (sys::state &state, dcon::nation_id n)
 
float nations::get_foreign_investment_as_gp (sys::state &state, dcon::nation_id n)
 
void nations::update_industrial_scores (sys::state &state)
 
void nations::update_military_scores (sys::state &state)
 
float nations::prestige_score (sys::state const &state, dcon::nation_id n)
 
void nations::update_rankings (sys::state &state)
 
void nations::update_ui_rankings (sys::state &state)
 
bool nations::is_great_power (sys::state const &state, dcon::nation_id id)
 
void nations::update_great_powers (sys::state &state)
 
status nations::get_status (sys::state &state, dcon::nation_id n)
 
sys::date nations::get_research_end_date (sys::state &state, dcon::technology_id tech_id, dcon::nation_id n)
 
dcon::technology_id nations::current_research (sys::state const &state, dcon::nation_id n)
 
float nations::suppression_points (sys::state const &state, dcon::nation_id n)
 
float nations::leadership_points (sys::state const &state, dcon::nation_id n)
 
int32_t nations::max_national_focuses (sys::state &state, dcon::nation_id n)
 
int32_t nations::national_focuses_in_use (sys::state &state, dcon::nation_id n)
 
float nations::diplomatic_points (sys::state const &state, dcon::nation_id n)
 
float nations::monthly_diplomatic_points (sys::state const &state, dcon::nation_id n)
 
float nations::colonial_points_from_ships (sys::state &state, dcon::nation_id n)
 
float nations::colonial_points_from_naval_bases (sys::state &state, dcon::nation_id n)
 
float nations::colonial_points_from_technology (sys::state &state, dcon::nation_id n)
 
float nations::used_colonial_points (sys::state &state, dcon::nation_id n)
 
int32_t nations::free_colonial_points (sys::state &state, dcon::nation_id n)
 
int32_t nations::max_colonial_points (sys::state &state, dcon::nation_id n)
 
bool nations::can_expand_colony (sys::state &state, dcon::nation_id n)
 
bool nations::is_losing_colonial_race (sys::state &state, dcon::nation_id n)
 
bool nations::sphereing_progress_is_possible (sys::state &state, dcon::nation_id n)
 
bool nations::has_political_reform_available (sys::state &state, dcon::nation_id n)
 
bool nations::has_social_reform_available (sys::state &state, dcon::nation_id n)
 
bool nations::has_reform_available (sys::state &state, dcon::nation_id n)
 
bool nations::has_decision_available (sys::state &state, dcon::nation_id n)
 
void nations::get_active_political_parties (sys::state &state, dcon::nation_id n, std::vector< dcon::political_party_id > &parties)
 
void nations::monthly_adjust_relationship (sys::state &state, dcon::nation_id a, dcon::nation_id b, float delta)
 
void nations::update_revanchism (sys::state &state)
 
void nations::update_monthly_points (sys::state &state)
 
float nations::get_treasury (sys::state &state, dcon::nation_id n)
 
float nations::get_bank_funds (sys::state &state, dcon::nation_id n)
 
float nations::get_debt (sys::state &state, dcon::nation_id n)
 
float nations::tariff_efficiency (sys::state &state, dcon::nation_id n)
 
float nations::tax_efficiency (sys::state &state, dcon::nation_id n)
 
bool nations::is_involved_in_crisis (sys::state const &state, dcon::nation_id n)
 
bool nations::is_committed_in_crisis (sys::state const &state, dcon::nation_id n)
 
void nations::adjust_relationship (sys::state &state, dcon::nation_id a, dcon::nation_id b, float delta)
 
void nations::create_nation_based_on_template (sys::state &state, dcon::nation_id n, dcon::nation_id base)
 
void nations::run_gc (sys::state &state)
 
void nations::cleanup_nation (sys::state &state, dcon::nation_id n)
 
void nations::adjust_prestige (sys::state &state, dcon::nation_id n, float delta)
 
bool nations::destroy_vassal_relationships (sys::state &state, dcon::nation_id n)
 
void nations::destroy_diplomatic_relationships (sys::state &state, dcon::nation_id n)
 
void nations::release_vassal (sys::state &state, dcon::overlord_id rel)
 
void nations::make_vassal (sys::state &state, dcon::nation_id subject, dcon::nation_id overlord)
 
void nations::make_substate (sys::state &state, dcon::nation_id subject, dcon::nation_id overlord)
 
void nations::break_alliance (sys::state &state, dcon::diplomatic_relation_id rel)
 
void nations::break_alliance (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
void nations::make_alliance (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
bool nations::other_nation_is_influencing (sys::state &state, dcon::nation_id target, dcon::gp_relationship_id rel)
 
bool nations::can_accumulate_influence_with (sys::state &state, dcon::nation_id gp, dcon::nation_id target, dcon::gp_relationship_id rel)
 
float nations::get_base_shares (sys::state &state, dcon::gp_relationship_id gp, float total_gain, int32_t total_influence_shares)
 
bool nations::has_sphere_neighbour (sys::state &state, dcon::nation_id n, dcon::nation_id target)
 
void nations::update_influence (sys::state &state)
 
bool nations::can_put_flashpoint_focus_in_state (sys::state &state, dcon::state_instance_id s, dcon::nation_id fp_nation)
 
void nations::monthly_flashpoint_update (sys::state &state)
 
void nations::daily_update_flashpoint_tension (sys::state &state)
 
void nations::cleanup_crisis (sys::state &state)
 
void nations::add_as_primary_crisis_defender (sys::state &state, dcon::nation_id n)
 
void nations::add_as_primary_crisis_attacker (sys::state &state, dcon::nation_id n)
 
void nations::ask_to_defend_in_crisis (sys::state &state, dcon::nation_id n)
 
void nations::ask_to_attack_in_crisis (sys::state &state, dcon::nation_id n)
 
void nations::reject_crisis_participation (sys::state &state)
 
void nations::cleanup_crisis_peace_offer (sys::state &state, dcon::peace_offer_id peace)
 
void nations::accept_crisis_peace_offer (sys::state &state, dcon::nation_id from, dcon::nation_id to, dcon::peace_offer_id peace)
 
void nations::update_crisis (sys::state &state)
 
int32_t nations::num_crisis_wargoals (sys::state &state)
 
bool nations::nth_crisis_war_goal_is_for_attacker (sys::state &state, int32_t index)
 
military::full_wg nations::get_nth_crisis_war_goal (sys::state &state, int32_t index)
 
void nations::update_pop_acceptance (sys::state &state, dcon::nation_id n)
 
void nations::liberate_nation_from (sys::state &state, dcon::national_identity_id liberated, dcon::nation_id from)
 
void nations::release_nation_from (sys::state &state, dcon::national_identity_id liberated, dcon::nation_id from)
 
void nations::remove_cores_from_owned (sys::state &state, dcon::nation_id n, dcon::national_identity_id tag)
 
void nations::perform_nationalization (sys::state &state, dcon::nation_id n)
 
void nations::adjust_influence (sys::state &state, dcon::nation_id great_power, dcon::nation_id target, float delta)
 
void nations::adjust_influence_with_overflow (sys::state &state, dcon::nation_id great_power, dcon::nation_id target, float delta)
 
void nations::adjust_foreign_investment (sys::state &state, dcon::nation_id great_power, dcon::nation_id target, float delta)
 
float nations::get_yesterday_income (sys::state &state, dcon::nation_id n)
 
void nations::make_civilized (sys::state &state, dcon::nation_id n)
 
void nations::make_uncivilized (sys::state &state, dcon::nation_id n)
 
void nations::enact_reform (sys::state &state, dcon::nation_id source, dcon::reform_option_id r)
 
void nations::enact_issue (sys::state &state, dcon::nation_id source, dcon::issue_option_id i)
 

Variables

constexpr float nations::max_prestige = 2147483648.f