Project Alice
Loading...
Searching...
No Matches
province.cpp File Reference
#include "province.hpp"
#include "province_templates.hpp"
#include "dcon_generated.hpp"
#include "demographics.hpp"
#include "nations.hpp"
#include "system_state.hpp"
#include <vector>
#include "rebels.hpp"
#include "math_fns.hpp"
#include "prng.hpp"
#include "triggers.hpp"
Include dependency graph for province.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  province::queue_node
 
struct  province::province_and_distance
 
struct  province::retreat_province_and_distance
 

Namespaces

namespace  province
 

Functions

template auto province::is_overseas< ve::tagged_vector< dcon::province_id > > (sys::state const &, ve::tagged_vector< dcon::province_id >)
 
template void province::for_each_province_in_state_instance< std::function< void(dcon::province_id)> > (sys::state &, dcon::state_instance_id, std::function< void(dcon::province_id)> const &)
 
bool province::is_overseas (sys::state const &state, dcon::province_id ids)
 
bool province::nations_are_adjacent (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
void province::update_connected_regions (sys::state &state)
 
dcon::province_id province::pick_capital (sys::state &state, dcon::nation_id n)
 
void province::set_province_controller (sys::state &state, dcon::province_id p, dcon::nation_id n)
 
void province::set_province_controller (sys::state &state, dcon::province_id p, dcon::rebel_faction_id rf)
 
void province::restore_cached_values (sys::state &state)
 
void province::update_cached_values (sys::state &state)
 
void province::update_blockaded_cache (sys::state &state)
 
void province::restore_unsaved_values (sys::state &state)
 
bool province::has_railroads_being_built (sys::state &state, dcon::province_id id)
 
bool province::generic_can_build_railroads (sys::state &state, dcon::province_id id, dcon::nation_id n)
 
bool province::can_build_railroads (sys::state &state, dcon::province_id id, dcon::nation_id n)
 
bool province::has_fort_being_built (sys::state &state, dcon::province_id id)
 
bool province::can_build_fort (sys::state &state, dcon::province_id id, dcon::nation_id n)
 
bool province::has_naval_base_being_built (sys::state &state, dcon::province_id id)
 
bool province::can_build_naval_base (sys::state &state, dcon::province_id id, dcon::nation_id n)
 
bool province::has_province_building_being_built (sys::state &state, dcon::province_id id, economy::province_building_type t)
 
bool province::can_build_province_building (sys::state &state, dcon::province_id id, dcon::nation_id n, economy::province_building_type t)
 
bool province::has_an_owner (sys::state &state, dcon::province_id id)
 
float province::land_maximum_employment (sys::state &state, dcon::province_id id)
 
float province::land_employment (sys::state &state, dcon::province_id id)
 
float province::rgo_maximum_employment (sys::state &state, dcon::province_id id)
 
float province::rgo_employment (sys::state &state, dcon::province_id id)
 
float province::rgo_income (sys::state &state, dcon::province_id id)
 
float province::rgo_production_quantity (sys::state &state, dcon::province_id id, dcon::commodity_id c)
 
float province::rgo_size (sys::state &state, dcon::province_id prov_id)
 
float province::state_accepted_bureaucrat_size (sys::state &state, dcon::state_instance_id id)
 
float province::state_admin_efficiency (sys::state &state, dcon::state_instance_id id)
 
float province::crime_fighting_efficiency (sys::state &state, dcon::province_id id)
 
float province::revolt_risk (sys::state &state, dcon::province_id id)
 
dcon::province_id province::get_connected_province (sys::state &state, dcon::province_adjacency_id adj, dcon::province_id curr)
 
float province::state_distance (sys::state &state, dcon::state_instance_id state_id, dcon::province_id prov_id)
 
float province::state_sorting_distance (sys::state &state, dcon::state_instance_id state_id, dcon::province_id prov_id)
 
bool province::can_integrate_colony (sys::state &state, dcon::state_instance_id id)
 
float province::colony_integration_cost (sys::state &state, dcon::state_instance_id id)
 
void province::upgrade_colonial_state (sys::state &state, dcon::nation_id source, dcon::state_instance_id si)
 
void province::change_province_owner (sys::state &state, dcon::province_id id, dcon::nation_id new_owner)
 
void province::conquer_province (sys::state &state, dcon::province_id id, dcon::nation_id new_owner)
 
void province::update_nationalism (sys::state &state)
 
void province::update_crimes (sys::state &state)
 
bool province::is_colonizing (sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
 
bool province::can_invest_in_colony (sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
 
bool province::state_borders_nation (sys::state &state, dcon::nation_id n, dcon::state_instance_id si)
 
bool province::can_start_colony (sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
 
bool province::fast_can_start_colony (sys::state &state, dcon::nation_id n, dcon::state_definition_id d, int32_t free_points, dcon::province_id coastal_target, bool &adjacent)
 
void province::increase_colonial_investment (sys::state &state, dcon::nation_id source, dcon::state_definition_id state_def)
 
void province::update_colonization (sys::state &state)
 
bool province::state_is_coastal (sys::state &state, dcon::state_instance_id s)
 
bool province::state_is_coastal_non_core_nb (sys::state &state, dcon::state_instance_id s)
 
void province::add_core (sys::state &state, dcon::province_id prov, dcon::national_identity_id tag)
 
void province::remove_core (sys::state &state, dcon::province_id prov, dcon::national_identity_id tag)
 
void province::set_rgo (sys::state &state, dcon::province_id prov, dcon::commodity_id c)
 
void province::enable_canal (sys::state &state, int32_t id)
 
float province::distance (sys::state &state, dcon::province_adjacency_id pair)
 
float province::direct_distance (sys::state &state, dcon::province_id a, dcon::province_id b)
 
float province::sorting_distance (sys::state &state, dcon::province_id a, dcon::province_id b)
 
bool province::has_naval_access_to_province (sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
 
bool province::has_access_to_province (sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
 
bool province::has_safe_access_to_province (sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
 
std::vector< dcon::province_id > province::make_land_path (sys::state &state, dcon::province_id start, dcon::province_id end, dcon::nation_id nation_as, dcon::army_id a)
 
std::vector< dcon::province_id > province::make_safe_land_path (sys::state &state, dcon::province_id start, dcon::province_id end, dcon::nation_id nation_as)
 
std::vector< dcon::province_id > province::make_unowned_land_path (sys::state &state, dcon::province_id start, dcon::province_id end)
 
std::vector< dcon::province_id > province::make_naval_path (sys::state &state, dcon::province_id start, dcon::province_id end)
 
std::vector< dcon::province_id > province::make_naval_retreat_path (sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
 
std::vector< dcon::province_id > province::make_land_retreat_path (sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
 
std::vector< dcon::province_id > province::make_path_to_nearest_coast (sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
 
std::vector< dcon::province_id > province::make_unowned_path_to_nearest_coast (sys::state &state, dcon::province_id start)
 
void province::restore_distances (sys::state &state)