3#include "dcon_generated.hpp"
10inline constexpr uint16_t
to_map_id(dcon::province_id
id) {
11 return uint16_t(
id.index() + 1);
15 return dcon::province_id();
17 return dcon::province_id(
id - 1);
21 std::vector<dcon::province_adjacency_id>
canals;
23 ankerl::unordered_dense::map<dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash>
terrain_to_gfx_map;
85bool 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);
91void add_core(
sys::state& state, dcon::province_id prov, dcon::national_identity_id tag);
120std::vector<dcon::province_id>
make_land_path(
sys::state& state, dcon::province_id start, dcon::province_id end, dcon::nation_id nation_as, dcon::army_id a);
122std::vector<dcon::province_id>
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 > make_land_path(sys::state &state, dcon::province_id start, dcon::province_id end, dcon::nation_id nation_as, dcon::army_id a)
float direct_distance(sys::state &state, dcon::province_id a, dcon::province_id b)
float sorting_distance(sys::state &state, dcon::province_id a, dcon::province_id b)
void upgrade_colonial_state(sys::state &state, dcon::nation_id source, dcon::state_instance_id si)
float state_sorting_distance(sys::state &state, dcon::state_instance_id state_id, dcon::province_id prov_id)
bool has_an_owner(sys::state &state, dcon::province_id id)
bool can_build_railroads(sys::state &state, dcon::province_id id, dcon::nation_id n)
void update_connected_regions(sys::state &state)
void update_blockaded_cache(sys::state &state)
void update_nationalism(sys::state &state)
void update_crimes(sys::state &state)
std::vector< dcon::province_id > 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 > make_naval_retreat_path(sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
bool has_access_to_province(sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
bool has_naval_base_being_built(sys::state &state, dcon::province_id id)
void enable_canal(sys::state &state, int32_t id)
void add_core(sys::state &state, dcon::province_id prov, dcon::national_identity_id tag)
float state_distance(sys::state &state, dcon::state_instance_id state_id, dcon::province_id prov_id)
bool is_overseas(sys::state const &state, dcon::province_id ids)
bool has_safe_access_to_province(sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
void remove_core(sys::state &state, dcon::province_id prov, dcon::national_identity_id tag)
bool is_colonizing(sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
constexpr dcon::province_id from_map_id(uint16_t id)
bool can_build_province_building(sys::state &state, dcon::province_id id, dcon::nation_id n, economy::province_building_type t)
float state_accepted_bureaucrat_size(sys::state &state, dcon::state_instance_id id)
void set_rgo(sys::state &state, dcon::province_id prov, dcon::commodity_id c)
std::vector< dcon::province_id > make_path_to_nearest_coast(sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
float distance(sys::state &state, dcon::province_adjacency_id pair)
bool has_province_building_being_built(sys::state &state, dcon::province_id id, economy::province_building_type t)
float rgo_employment(sys::state &state, dcon::province_id id)
bool can_integrate_colony(sys::state &state, dcon::state_instance_id id)
std::vector< dcon::province_id > make_land_retreat_path(sys::state &state, dcon::nation_id nation_as, dcon::province_id start)
void restore_unsaved_values(sys::state &state)
bool 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)
float rgo_production_quantity(sys::state &state, dcon::province_id id, dcon::commodity_id c)
float crime_fighting_efficiency(sys::state &state, dcon::province_id id)
bool state_is_coastal(sys::state &state, dcon::state_instance_id s)
float rgo_maximum_employment(sys::state &state, dcon::province_id id)
bool has_railroads_being_built(sys::state &state, dcon::province_id id)
float land_maximum_employment(sys::state &state, dcon::province_id id)
bool can_build_fort(sys::state &state, dcon::province_id id, dcon::nation_id n)
bool can_start_colony(sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
float rgo_size(sys::state &state, dcon::province_id prov_id)
void update_cached_values(sys::state &state)
std::vector< dcon::province_id > make_naval_path(sys::state &state, dcon::province_id start, dcon::province_id end)
std::vector< dcon::province_id > make_unowned_land_path(sys::state &state, dcon::province_id start, dcon::province_id end)
bool can_invest_in_colony(sys::state &state, dcon::nation_id n, dcon::state_definition_id d)
void set_province_controller(sys::state &state, dcon::province_id p, dcon::nation_id n)
void update_colonization(sys::state &state)
float land_employment(sys::state &state, dcon::province_id id)
bool has_naval_access_to_province(sys::state &state, dcon::nation_id nation_as, dcon::province_id prov)
float rgo_income(sys::state &state, dcon::province_id id)
void conquer_province(sys::state &state, dcon::province_id id, dcon::nation_id new_owner)
constexpr float world_circumference
bool state_is_coastal_non_core_nb(sys::state &state, dcon::state_instance_id s)
bool has_fort_being_built(sys::state &state, dcon::province_id id)
bool nations_are_adjacent(sys::state &state, dcon::nation_id a, dcon::nation_id b)
bool can_build_naval_base(sys::state &state, dcon::province_id id, dcon::nation_id n)
dcon::province_id get_connected_province(sys::state &state, dcon::province_adjacency_id adj, dcon::province_id curr)
float revolt_risk(sys::state &state, dcon::province_id id)
float colony_integration_cost(sys::state &state, dcon::state_instance_id id)
float state_admin_efficiency(sys::state &state, dcon::state_instance_id id)
void change_province_owner(sys::state &state, dcon::province_id id, dcon::nation_id new_owner)
constexpr uint16_t to_map_id(dcon::province_id id)
std::vector< dcon::province_id > make_unowned_path_to_nearest_coast(sys::state &state, dcon::province_id start)
dcon::province_id pick_capital(sys::state &state, dcon::nation_id n)
void restore_distances(sys::state &state)
bool state_borders_nation(sys::state &state, dcon::nation_id n, dcon::state_instance_id si)
void increase_colonial_investment(sys::state &state, dcon::nation_id source, dcon::state_definition_id state_def)
bool generic_can_build_railroads(sys::state &state, dcon::province_id id, dcon::nation_id n)
dcon::modifier_id south_america
std::vector< bool > connected_region_is_coastal
ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > terrain_to_gfx_map
std::vector< dcon::province_adjacency_id > canals
dcon::province_id first_sea_province
dcon::modifier_id north_america
dcon::modifier_id oceania
std::vector< dcon::province_id > canal_provinces