Project Alice
|
Classes | |
struct | building_information |
struct | commodity_profit_holder |
struct | commodity_set |
struct | construction_status |
struct | global_economy_state |
struct | new_factory |
struct | profit_distribution |
struct | rgo_workers_breakdown |
struct | small_commodity_set |
struct | upgraded_factory |
Enumerations | |
enum class | province_building_type : uint8_t { railroad , fort , naval_base , bank , university , last , factory , province_selector , province_immigrator } |
enum class | economy_reason { pop , factory , rgo , artisan , construction , nation , stockpile , overseas_penalty } |
enum | commodity_production_type { primary , derivative , both } |
enum class | worker_effect : uint8_t { none = 0 , input , output , throughput } |
Functions | |
void | register_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason) |
void | register_intermediate_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason) |
void | register_construction_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount) |
void | register_domestic_supply (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason) |
template void | for_each_new_factory< std::function< void(new_factory)> > (sys::state &, dcon::state_instance_id, std::function< void(new_factory)> &&) |
template void | for_each_upgraded_factory< std::function< void(upgraded_factory)> > (sys::state &, dcon::state_instance_id, std::function< void(upgraded_factory)> &&) |
bool | can_take_loans (sys::state &state, dcon::nation_id n) |
float | interest_payment (sys::state &state, dcon::nation_id n) |
float | max_loan (sys::state &state, dcon::nation_id n) |
int32_t | most_recent_price_record_index (sys::state &state) |
int32_t | previous_price_record_index (sys::state &state) |
int32_t | most_recent_gdp_record_index (sys::state &state) |
int32_t | previous_gdp_record_index (sys::state &state) |
float | ideal_pound_conversion_rate (sys::state &state, dcon::nation_id n) |
float | gdp_adjusted (sys::state &state, dcon::nation_id n) |
float | full_spending_cost (sys::state &state, dcon::nation_id n) |
void | populate_army_consumption (sys::state &state) |
void | populate_navy_consumption (sys::state &state) |
void | populate_construction_consumption (sys::state &state) |
float | commodity_daily_production_amount (sys::state &state, dcon::commodity_id c) |
float | stockpile_commodity_daily_increase (sys::state &state, dcon::commodity_id c, dcon::nation_id n) |
float | global_market_commodity_daily_increase (sys::state &state, dcon::commodity_id c) |
bool | has_factory (sys::state const &state, dcon::state_instance_id si) |
void | initialize_artisan_distribution (sys::state &state) |
void | initialize_needs_weights (sys::state &state, dcon::nation_id n) |
float | need_weight (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
void | rebalance_needs_weights (sys::state &state, dcon::nation_id n) |
void | convert_commodities_into_ingredients (sys::state &state, std::vector< float > &buffer_commodities, std::vector< float > &buffer_ingredients, std::vector< float > &buffer_weights) |
void | presimulate (sys::state &state) |
bool | has_building (sys::state const &state, dcon::state_instance_id si, dcon::factory_type_id fac) |
bool | is_bankrupt_debtor_to (sys::state &state, dcon::nation_id debt_holder, dcon::nation_id debtor) |
bool | nation_is_constructing_factories (sys::state &state, dcon::nation_id n) |
bool | nation_has_closed_factories (sys::state &state, dcon::nation_id n) |
float | base_artisan_profit (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
float | artisan_scale_limit (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
bool | valid_artisan_good (sys::state &state, dcon::nation_id n, dcon::commodity_id cid) |
float | pseudo_exp_for_negative (float f) |
float | get_artisans_multiplier (sys::state &state, dcon::nation_id n) |
float | max_artisan_score (sys::state &state, dcon::nation_id n, float multiplier) |
float | total_artisan_exp_score (sys::state &state, dcon::nation_id n, float multiplier, float max_score) |
float | get_artisan_distribution_fast (sys::state &state, dcon::nation_id n, dcon::commodity_id c, float max_score, float total_score, float multiplier) |
float | get_artisan_distribution_slow (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
void | adjust_artisan_balance (sys::state &state, dcon::nation_id n) |
void | initialize (sys::state &state) |
float | sphere_leader_share_factor (sys::state &state, dcon::nation_id sphere_leader, dcon::nation_id sphere_member) |
void | absorb_sphere_member_production (sys::state &state, dcon::nation_id n) |
void | give_sphere_leader_production (sys::state &state, dcon::nation_id n) |
float | effective_tariff_rate (sys::state &state, dcon::nation_id n) |
float | global_market_price_multiplier (sys::state &state, dcon::nation_id n) |
void | update_factory_triggered_modifiers (sys::state &state) |
float | subsistence_size (sys::state const &state, dcon::province_id p) |
float | rgo_effective_size (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c) |
float | rgo_total_effective_size (sys::state &state, dcon::nation_id n, dcon::province_id p) |
float | subsistence_max_pseudoemployment (sys::state &state, dcon::nation_id n, dcon::province_id p) |
float | rgo_total_employment (sys::state &state, dcon::nation_id n, dcon::province_id p) |
float | rgo_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c) |
float | rgo_total_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p) |
void | update_local_subsistence_factor (sys::state &state) |
float | adjusted_subsistence_score (sys::state &state, dcon::province_id p) |
void | update_land_ownership (sys::state &state) |
int32_t | factory_priority (sys::state const &state, dcon::factory_id f) |
void | set_factory_priority (sys::state &state, dcon::factory_id f, int32_t priority) |
bool | factory_is_profitable (sys::state const &state, dcon::factory_id f) |
void | update_rgo_employment (sys::state &state) |
float | factory_max_employment (sys::state const &state, dcon::factory_id f) |
float | factory_primary_employment (sys::state const &state, dcon::factory_id f) |
float | factory_secondary_employment (sys::state const &state, dcon::factory_id f) |
float | factory_total_employment (sys::state const &state, dcon::factory_id f) |
void | update_factory_employment (sys::state &state) |
float | factory_full_production_quantity (sys::state const &state, dcon::factory_id f, dcon::nation_id n, float mobilization_impact) |
float | rgo_efficiency (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c) |
float | rgo_full_production_quantity (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c) |
float | factory_min_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type) |
float | factory_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type) |
float | factory_min_e_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type) |
float | factory_e_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type) |
float | nation_factory_input_multiplier (sys::state &state, dcon::nation_id n) |
float | nation_factory_output_multiplier (sys::state &state, dcon::factory_type_id fac_type, dcon::nation_id n) |
float | factory_input_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s) |
float | factory_throughput_multiplier (sys::state &state, dcon::factory_type_fat_id fac_type, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s) |
float | factory_output_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p) |
float | factory_max_production_scale_non_modified (sys::state &state, dcon::factory_fat_id fac) |
float | factory_max_production_scale (sys::state &state, dcon::factory_fat_id fac, float mobilization_impact, bool occupied) |
float | update_factory_scale (sys::state &state, dcon::factory_fat_id fac, float max_production_scale, float raw_profit, float desired_raw_profit) |
float | factory_desired_raw_profit (dcon::factory_fat_id fac, float spendings) |
void | update_single_factory_consumption (sys::state &state, dcon::factory_id f, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s, float mobilization_impact, float expected_min_wage, bool occupied) |
void | update_single_factory_production (sys::state &state, dcon::factory_id f, dcon::nation_id n, float expected_min_wage) |
rgo_workers_breakdown | rgo_relevant_population (sys::state &state, dcon::province_id p, dcon::nation_id n) |
float | rgo_desired_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, float min_wage, float total_relevant_population) |
float | rgo_expected_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, dcon::commodity_id c) |
float | convex_function (float x) |
void | update_province_rgo_consumption (sys::state &state, dcon::province_id p, dcon::nation_id n, float mobilization_impact, float expected_min_wage, bool occupied) |
void | update_province_rgo_production (sys::state &state, dcon::province_id p, dcon::nation_id n) |
void | update_national_artisan_consumption (sys::state &state, dcon::nation_id n, float expected_min_wage, float mobilization_impact) |
void | update_national_artisan_production (sys::state &state, dcon::nation_id n) |
float | global_non_factory_construction_time_modifier (sys::state &state) |
float | global_factory_construction_time_modifier (sys::state &state) |
void | populate_private_construction_consumption (sys::state &state) |
float | estimate_stockpile_filling_spending (sys::state &state, dcon::nation_id n) |
float | estimate_overseas_penalty_spending (sys::state &state, dcon::nation_id n) |
float | full_private_investment_cost (sys::state &state, dcon::nation_id n) |
void | update_national_consumption (sys::state &state, dcon::nation_id n, float spending_scale, float private_investment_scale) |
void | update_pop_consumption (sys::state &state, dcon::nation_id n, float base_demand, float invention_factor) |
void | populate_needs_costs (sys::state &state, dcon::nation_id n, float base_demand, float invention_factor) |
void | advance_construction (sys::state &state, dcon::nation_id n) |
float | pop_min_wage_factor (sys::state &state, dcon::nation_id n) |
float | pop_farmer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor) |
float | pop_laborer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor) |
float | pop_factory_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor) |
void | populate_effective_prices (sys::state &state, dcon::nation_id n) |
profit_distribution | distribute_factory_profit (sys::state const &state, dcon::state_instance_const_fat_id s, float min_wage, float total_profit) |
void | emulate_construction_demand (sys::state &state, dcon::nation_id n) |
void | daily_update (sys::state &state, bool initiate_buildings) |
void | regenerate_unsaved_values (sys::state &state) |
float | government_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
float | factory_type_build_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type) |
float | factory_type_output_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type) |
float | factory_type_input_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type) |
float | nation_factory_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
float | nation_pop_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c) |
float | nation_total_imports (sys::state &state, dcon::nation_id n) |
float | pop_income (sys::state &state, dcon::pop_id p) |
float | estimate_gold_income (sys::state &state, dcon::nation_id n) |
float | estimate_tariff_income (sys::state &state, dcon::nation_id n) |
float | estimate_social_spending (sys::state &state, dcon::nation_id n) |
float | estimate_pop_payouts_by_income_type (sys::state &state, dcon::nation_id n, culture::income_type in) |
float | estimate_tax_income_by_strata (sys::state &state, dcon::nation_id n, culture::pop_strata ps) |
float | estimate_subsidy_spending (sys::state &state, dcon::nation_id n) |
float | estimate_war_subsidies_income (sys::state &state, dcon::nation_id n) |
float | estimate_reparations_income (sys::state &state, dcon::nation_id n) |
float | estimate_war_subsidies_spending (sys::state &state, dcon::nation_id n) |
float | estimate_reparations_spending (sys::state &state, dcon::nation_id n) |
float | estimate_diplomatic_balance (sys::state &state, dcon::nation_id n) |
float | estimate_domestic_investment (sys::state &state, dcon::nation_id n) |
float | estimate_land_spending (sys::state &state, dcon::nation_id n) |
float | estimate_naval_spending (sys::state &state, dcon::nation_id n) |
float | estimate_construction_spending (sys::state &state, dcon::nation_id n) |
float | estimate_war_subsidies (sys::state &state, dcon::nation_id n) |
construction_status | province_building_construction (sys::state &state, dcon::province_id p, province_building_type t) |
construction_status | factory_upgrade (sys::state &state, dcon::factory_id f) |
bool | state_contains_constructed_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft) |
bool | state_contains_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft) |
int32_t | state_factory_count (sys::state &state, dcon::state_instance_id sid, dcon::nation_id n) |
float | unit_construction_progress (sys::state &state, dcon::province_land_construction_id c) |
float | unit_construction_progress (sys::state &state, dcon::province_naval_construction_id c) |
void | add_factory_level_to_state (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t, bool is_upgrade) |
void | resolve_constructions (sys::state &state) |
float | estimate_daily_income (sys::state &state, dcon::nation_id n) |
void | try_add_factory_to_state (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t) |
void | bound_budget_settings (sys::state &state, dcon::nation_id n) |
void | prune_factories (sys::state &state) |
dcon::modifier_id | get_province_selector_modifier (sys::state &state) |
dcon::modifier_id | get_province_immigrator_modifier (sys::state &state) |
void | go_bankrupt (sys::state &state, dcon::nation_id n) |
commodity_production_type | get_commodity_production_type (sys::state &state, dcon::commodity_id c) |
std::string_view | province_building_type_get_name (economy::province_building_type v) |
std::string_view | province_building_type_get_level_text (economy::province_building_type v) |
template<typename T > | |
auto | desired_needs_spending (sys::state const &state, T pop_indices) |
constexpr dcon::commodity_id | money (0) |
float | rgo_full_production_quantity (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c) |
template<typename F > | |
void | for_each_new_factory (sys::state &state, dcon::state_instance_id s, F &&func) |
template<typename F > | |
void | for_each_upgraded_factory (sys::state &state, dcon::state_instance_id s, F &&func) |
Enumerator | |
---|---|
primary | |
derivative | |
both |
Definition at line 8 of file economy.hpp.
|
strong |
Enumerator | |
---|---|
pop | |
factory | |
rgo | |
artisan | |
construction | |
nation | |
stockpile | |
overseas_penalty |
Definition at line 15 of file economy.cpp.
|
strong |
Enumerator | |
---|---|
railroad | |
fort | |
naval_base | |
bank | |
university | |
last | |
factory | |
province_selector | |
province_immigrator |
Definition at line 578 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
none | |
input | |
output | |
throughput |
Definition at line 110 of file economy.hpp.
void economy::absorb_sphere_member_production | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 833 of file economy.cpp.
void economy::add_factory_level_to_state | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
dcon::factory_type_id | t, | ||
bool | is_upgrade | ||
) |
Definition at line 4963 of file economy.cpp.
void economy::adjust_artisan_balance | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 556 of file economy.cpp.
float economy::adjusted_subsistence_score | ( | sys::state & | state, |
dcon::province_id | p | ||
) |
Definition at line 981 of file economy.cpp.
void economy::advance_construction | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2642 of file economy.cpp.
float economy::artisan_scale_limit | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 440 of file economy.cpp.
float economy::base_artisan_profit | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 422 of file economy.cpp.
void economy::bound_budget_settings | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 5271 of file economy.cpp.
bool economy::can_take_loans | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
float economy::commodity_daily_production_amount | ( | sys::state & | state, |
dcon::commodity_id | c | ||
) |
void economy::convert_commodities_into_ingredients | ( | sys::state & | state, |
std::vector< float > & | buffer_commodities, | ||
std::vector< float > & | buffer_ingredients, | ||
std::vector< float > & | buffer_weights | ||
) |
Definition at line 284 of file economy.cpp.
float economy::convex_function | ( | float | x | ) |
Definition at line 1808 of file economy.cpp.
void economy::daily_update | ( | sys::state & | state, |
bool | initiate_buildings | ||
) |
Definition at line 3070 of file economy.cpp.
auto economy::desired_needs_spending | ( | sys::state const & | state, |
T | pop_indices | ||
) |
profit_distribution economy::distribute_factory_profit | ( | sys::state const & | state, |
dcon::state_instance_const_fat_id | s, | ||
float | min_wage, | ||
float | total_profit | ||
) |
Definition at line 2905 of file economy.cpp.
float economy::effective_tariff_rate | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 860 of file economy.cpp.
void economy::emulate_construction_demand | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2949 of file economy.cpp.
float economy::estimate_construction_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4740 of file economy.cpp.
float economy::estimate_daily_income | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 5228 of file economy.cpp.
float economy::estimate_diplomatic_balance | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4700 of file economy.cpp.
float economy::estimate_domestic_investment | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4706 of file economy.cpp.
float economy::estimate_gold_income | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4558 of file economy.cpp.
float economy::estimate_land_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4720 of file economy.cpp.
float economy::estimate_naval_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4730 of file economy.cpp.
float economy::estimate_overseas_penalty_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2354 of file economy.cpp.
float economy::estimate_pop_payouts_by_income_type | ( | sys::state & | state, |
dcon::nation_id | n, | ||
culture::income_type | in | ||
) |
Definition at line 4602 of file economy.cpp.
float economy::estimate_reparations_income | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
float economy::estimate_reparations_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4683 of file economy.cpp.
float economy::estimate_social_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4576 of file economy.cpp.
float economy::estimate_stockpile_filling_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2339 of file economy.cpp.
float economy::estimate_subsidy_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4641 of file economy.cpp.
float economy::estimate_tariff_income | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4572 of file economy.cpp.
float economy::estimate_tax_income_by_strata | ( | sys::state & | state, |
dcon::nation_id | n, | ||
culture::pop_strata | ps | ||
) |
Definition at line 4629 of file economy.cpp.
float economy::estimate_war_subsidies | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4827 of file economy.cpp.
float economy::estimate_war_subsidies_income | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4645 of file economy.cpp.
float economy::estimate_war_subsidies_spending | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4671 of file economy.cpp.
float economy::factory_desired_raw_profit | ( | dcon::factory_fat_id | fac, |
float | spendings | ||
) |
Definition at line 1533 of file economy.cpp.
float economy::factory_e_input_total_cost | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_fat_id | fac_type | ||
) |
Definition at line 1408 of file economy.cpp.
float economy::factory_full_production_quantity | ( | sys::state const & | state, |
dcon::factory_id | f, | ||
dcon::nation_id | n, | ||
float | mobilization_impact | ||
) |
Definition at line 1274 of file economy.cpp.
float economy::factory_input_multiplier | ( | sys::state & | state, |
dcon::factory_fat_id | fac, | ||
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::state_instance_id | s | ||
) |
Definition at line 1436 of file economy.cpp.
float economy::factory_input_total_cost | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_fat_id | fac_type | ||
) |
Definition at line 1377 of file economy.cpp.
bool economy::factory_is_profitable | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
Definition at line 1011 of file economy.cpp.
float economy::factory_max_employment | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
Definition at line 1124 of file economy.cpp.
float economy::factory_max_production_scale | ( | sys::state & | state, |
dcon::factory_fat_id | fac, | ||
float | mobilization_impact, | ||
bool | occupied | ||
) |
Definition at line 1487 of file economy.cpp.
float economy::factory_max_production_scale_non_modified | ( | sys::state & | state, |
dcon::factory_fat_id | fac | ||
) |
Definition at line 1482 of file economy.cpp.
float economy::factory_min_e_input_available | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_fat_id | fac_type | ||
) |
Definition at line 1390 of file economy.cpp.
float economy::factory_min_input_available | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_fat_id | fac_type | ||
) |
Definition at line 1356 of file economy.cpp.
float economy::factory_output_multiplier | ( | sys::state & | state, |
dcon::factory_fat_id | fac, | ||
dcon::nation_id | n, | ||
dcon::province_id | p | ||
) |
Definition at line 1470 of file economy.cpp.
float economy::factory_primary_employment | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
Definition at line 1128 of file economy.cpp.
int32_t economy::factory_priority | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
float economy::factory_secondary_employment | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
Definition at line 1132 of file economy.cpp.
float economy::factory_throughput_multiplier | ( | sys::state & | state, |
dcon::factory_type_fat_id | fac_type, | ||
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::state_instance_id | s | ||
) |
Definition at line 1463 of file economy.cpp.
float economy::factory_total_employment | ( | sys::state const & | state, |
dcon::factory_id | f | ||
) |
Definition at line 1136 of file economy.cpp.
float economy::factory_type_build_cost | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_id | factory_type | ||
) |
Definition at line 4396 of file economy.cpp.
float economy::factory_type_input_cost | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_id | factory_type | ||
) |
float economy::factory_type_output_cost | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::factory_type_id | factory_type | ||
) |
construction_status economy::factory_upgrade | ( | sys::state & | state, |
dcon::factory_id | f | ||
) |
Definition at line 4850 of file economy.cpp.
void economy::for_each_new_factory | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
F && | func | ||
) |
template void economy::for_each_new_factory< std::function< void(new_factory)> > | ( | sys::state & | , |
dcon::state_instance_id | , | ||
std::function< void(new_factory)> && | |||
) |
void economy::for_each_upgraded_factory | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
F && | func | ||
) |
Definition at line 30 of file economy_templates.hpp.
template void economy::for_each_upgraded_factory< std::function< void(upgraded_factory)> > | ( | sys::state & | , |
dcon::state_instance_id | , | ||
std::function< void(upgraded_factory)> && | |||
) |
float economy::full_private_investment_cost | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2374 of file economy.cpp.
float economy::full_spending_cost | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2224 of file economy.cpp.
float economy::gdp_adjusted | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 103 of file economy.cpp.
float economy::get_artisan_distribution_fast | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c, | ||
float | max_score, | ||
float | total_score, | ||
float | multiplier | ||
) |
Definition at line 534 of file economy.cpp.
float economy::get_artisan_distribution_slow | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 546 of file economy.cpp.
float economy::get_artisans_multiplier | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 489 of file economy.cpp.
commodity_production_type economy::get_commodity_production_type | ( | sys::state & | state, |
dcon::commodity_id | c | ||
) |
Definition at line 5431 of file economy.cpp.
dcon::modifier_id economy::get_province_immigrator_modifier | ( | sys::state & | state | ) |
Definition at line 5383 of file economy.cpp.
dcon::modifier_id economy::get_province_selector_modifier | ( | sys::state & | state | ) |
Definition at line 5379 of file economy.cpp.
void economy::give_sphere_leader_production | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 848 of file economy.cpp.
float economy::global_factory_construction_time_modifier | ( | sys::state & | state | ) |
Definition at line 2060 of file economy.cpp.
float economy::global_market_commodity_daily_increase | ( | sys::state & | state, |
dcon::commodity_id | c | ||
) |
float economy::global_market_price_multiplier | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 866 of file economy.cpp.
float economy::global_non_factory_construction_time_modifier | ( | sys::state & | state | ) |
Definition at line 2043 of file economy.cpp.
void economy::go_bankrupt | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 5387 of file economy.cpp.
float economy::government_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 4380 of file economy.cpp.
bool economy::has_building | ( | sys::state const & | state, |
dcon::state_instance_id | si, | ||
dcon::factory_type_id | fac | ||
) |
Definition at line 384 of file economy.cpp.
bool economy::has_factory | ( | sys::state const & | state, |
dcon::state_instance_id | si | ||
) |
float economy::ideal_pound_conversion_rate | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
void economy::initialize | ( | sys::state & | state | ) |
Definition at line 593 of file economy.cpp.
void economy::initialize_artisan_distribution | ( | sys::state & | state | ) |
void economy::initialize_needs_weights | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 166 of file economy.cpp.
float economy::interest_payment | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 62 of file economy.cpp.
bool economy::is_bankrupt_debtor_to | ( | sys::state & | state, |
dcon::nation_id | debt_holder, | ||
dcon::nation_id | debtor | ||
) |
Definition at line 398 of file economy.cpp.
float economy::max_artisan_score | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | multiplier | ||
) |
Definition at line 496 of file economy.cpp.
float economy::max_loan | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
|
inlineconstexpr |
int32_t economy::most_recent_gdp_record_index | ( | sys::state & | state | ) |
int32_t economy::most_recent_price_record_index | ( | sys::state & | state | ) |
float economy::nation_factory_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 4435 of file economy.cpp.
float economy::nation_factory_input_multiplier | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 1422 of file economy.cpp.
float economy::nation_factory_output_multiplier | ( | sys::state & | state, |
dcon::factory_type_id | fac_type, | ||
dcon::nation_id | n | ||
) |
Definition at line 1429 of file economy.cpp.
bool economy::nation_has_closed_factories | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 408 of file economy.cpp.
bool economy::nation_is_constructing_factories | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 404 of file economy.cpp.
float economy::nation_pop_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 4514 of file economy.cpp.
float economy::nation_total_imports | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 4527 of file economy.cpp.
float economy::need_weight | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
float economy::pop_factory_min_wage | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | min_wage_factor | ||
) |
Definition at line 2832 of file economy.cpp.
float economy::pop_farmer_min_wage | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | min_wage_factor | ||
) |
Definition at line 2818 of file economy.cpp.
float economy::pop_income | ( | sys::state & | state, |
dcon::pop_id | p | ||
) |
Definition at line 4539 of file economy.cpp.
float economy::pop_laborer_min_wage | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | min_wage_factor | ||
) |
Definition at line 2825 of file economy.cpp.
float economy::pop_min_wage_factor | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2813 of file economy.cpp.
void economy::populate_army_consumption | ( | sys::state & | state | ) |
Definition at line 1977 of file economy.cpp.
void economy::populate_construction_consumption | ( | sys::state & | state | ) |
Definition at line 2065 of file economy.cpp.
void economy::populate_effective_prices | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 2847 of file economy.cpp.
void economy::populate_navy_consumption | ( | sys::state & | state | ) |
Definition at line 2004 of file economy.cpp.
void economy::populate_needs_costs | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | base_demand, | ||
float | invention_factor | ||
) |
Definition at line 2592 of file economy.cpp.
void economy::populate_private_construction_consumption | ( | sys::state & | state | ) |
Definition at line 2174 of file economy.cpp.
void economy::presimulate | ( | sys::state & | state | ) |
Definition at line 370 of file economy.cpp.
int32_t economy::previous_gdp_record_index | ( | sys::state & | state | ) |
Definition at line 93 of file economy.cpp.
int32_t economy::previous_price_record_index | ( | sys::state & | state | ) |
Definition at line 85 of file economy.cpp.
construction_status economy::province_building_construction | ( | sys::state & | state, |
dcon::province_id | p, | ||
province_building_type | t | ||
) |
Definition at line 4832 of file economy.cpp.
|
inline |
|
inline |
void economy::prune_factories | ( | sys::state & | state | ) |
Definition at line 5340 of file economy.cpp.
float economy::pseudo_exp_for_negative | ( | float | f | ) |
Definition at line 470 of file economy.cpp.
void economy::rebalance_needs_weights | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 200 of file economy.cpp.
void economy::regenerate_unsaved_values | ( | sys::state & | state | ) |
Definition at line 4332 of file economy.cpp.
void economy::register_construction_demand | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | commodity_type, | ||
float | amount | ||
) |
void economy::register_demand | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | commodity_type, | ||
float | amount, | ||
economy_reason | reason | ||
) |
void economy::register_domestic_supply | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | commodity_type, | ||
float | amount, | ||
economy_reason | reason | ||
) |
void economy::register_intermediate_demand | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | commodity_type, | ||
float | amount, | ||
economy_reason | reason | ||
) |
Definition at line 25 of file economy.cpp.
void economy::resolve_constructions | ( | sys::state & | state | ) |
Definition at line 4990 of file economy.cpp.
float economy::rgo_desired_worker_norm_profit | ( | sys::state & | state, |
dcon::province_id | p, | ||
dcon::nation_id | n, | ||
float | min_wage, | ||
float | total_relevant_population | ||
) |
Definition at line 1743 of file economy.cpp.
float economy::rgo_effective_size | ( | sys::state const & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::commodity_id | c | ||
) |
Definition at line 909 of file economy.cpp.
float economy::rgo_efficiency | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::commodity_id | c | ||
) |
Definition at line 1301 of file economy.cpp.
float economy::rgo_expected_worker_norm_profit | ( | sys::state & | state, |
dcon::province_id | p, | ||
dcon::nation_id | n, | ||
dcon::commodity_id | c | ||
) |
Definition at line 1793 of file economy.cpp.
float economy::rgo_full_production_quantity | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::commodity_id | c | ||
) |
Definition at line 1342 of file economy.cpp.
float economy::rgo_full_production_quantity | ( | sys::state const & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::commodity_id | c | ||
) |
float economy::rgo_max_employment | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::commodity_id | c | ||
) |
Definition at line 951 of file economy.cpp.
rgo_workers_breakdown economy::rgo_relevant_population | ( | sys::state & | state, |
dcon::province_id | p, | ||
dcon::nation_id | n | ||
) |
Definition at line 1727 of file economy.cpp.
float economy::rgo_total_effective_size | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p | ||
) |
Definition at line 931 of file economy.cpp.
float economy::rgo_total_employment | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p | ||
) |
Definition at line 943 of file economy.cpp.
float economy::rgo_total_max_employment | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p | ||
) |
Definition at line 955 of file economy.cpp.
void economy::set_factory_priority | ( | sys::state & | state, |
dcon::factory_id | f, | ||
int32_t | priority | ||
) |
Definition at line 1007 of file economy.cpp.
float economy::sphere_leader_share_factor | ( | sys::state & | state, |
dcon::nation_id | sphere_leader, | ||
dcon::nation_id | sphere_member | ||
) |
Definition at line 810 of file economy.cpp.
bool economy::state_contains_constructed_factory | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
dcon::factory_type_id | ft | ||
) |
Definition at line 4879 of file economy.cpp.
bool economy::state_contains_factory | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
dcon::factory_type_id | ft | ||
) |
Definition at line 4892 of file economy.cpp.
int32_t economy::state_factory_count | ( | sys::state & | state, |
dcon::state_instance_id | sid, | ||
dcon::nation_id | n | ||
) |
Definition at line 4911 of file economy.cpp.
float economy::stockpile_commodity_daily_increase | ( | sys::state & | state, |
dcon::commodity_id | c, | ||
dcon::nation_id | n | ||
) |
float economy::subsistence_max_pseudoemployment | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::province_id | p | ||
) |
Definition at line 939 of file economy.cpp.
float economy::subsistence_size | ( | sys::state const & | state, |
dcon::province_id | p | ||
) |
Definition at line 904 of file economy.cpp.
float economy::total_artisan_exp_score | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | multiplier, | ||
float | max_score | ||
) |
Definition at line 516 of file economy.cpp.
void economy::try_add_factory_to_state | ( | sys::state & | state, |
dcon::state_instance_id | s, | ||
dcon::factory_type_id | t | ||
) |
Definition at line 5237 of file economy.cpp.
float economy::unit_construction_progress | ( | sys::state & | state, |
dcon::province_land_construction_id | c | ||
) |
Definition at line 4926 of file economy.cpp.
float economy::unit_construction_progress | ( | sys::state & | state, |
dcon::province_naval_construction_id | c | ||
) |
void economy::update_factory_employment | ( | sys::state & | state | ) |
Definition at line 1143 of file economy.cpp.
float economy::update_factory_scale | ( | sys::state & | state, |
dcon::factory_fat_id | fac, | ||
float | max_production_scale, | ||
float | raw_profit, | ||
float | desired_raw_profit | ||
) |
Definition at line 1494 of file economy.cpp.
void economy::update_factory_triggered_modifiers | ( | sys::state & | state | ) |
Definition at line 877 of file economy.cpp.
void economy::update_land_ownership | ( | sys::state & | state | ) |
Definition at line 987 of file economy.cpp.
void economy::update_local_subsistence_factor | ( | sys::state & | state | ) |
Definition at line 963 of file economy.cpp.
void economy::update_national_artisan_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | expected_min_wage, | ||
float | mobilization_impact | ||
) |
Definition at line 1878 of file economy.cpp.
void economy::update_national_artisan_production | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 1946 of file economy.cpp.
void economy::update_national_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | spending_scale, | ||
float | private_investment_scale | ||
) |
Definition at line 2384 of file economy.cpp.
void economy::update_pop_consumption | ( | sys::state & | state, |
dcon::nation_id | n, | ||
float | base_demand, | ||
float | invention_factor | ||
) |
Definition at line 2426 of file economy.cpp.
void economy::update_province_rgo_consumption | ( | sys::state & | state, |
dcon::province_id | p, | ||
dcon::nation_id | n, | ||
float | mobilization_impact, | ||
float | expected_min_wage, | ||
bool | occupied | ||
) |
Definition at line 1812 of file economy.cpp.
void economy::update_province_rgo_production | ( | sys::state & | state, |
dcon::province_id | p, | ||
dcon::nation_id | n | ||
) |
Definition at line 1856 of file economy.cpp.
void economy::update_rgo_employment | ( | sys::state & | state | ) |
Definition at line 1020 of file economy.cpp.
void economy::update_single_factory_consumption | ( | sys::state & | state, |
dcon::factory_id | f, | ||
dcon::nation_id | n, | ||
dcon::province_id | p, | ||
dcon::state_instance_id | s, | ||
float | mobilization_impact, | ||
float | expected_min_wage, | ||
bool | occupied | ||
) |
Definition at line 1537 of file economy.cpp.
void economy::update_single_factory_production | ( | sys::state & | state, |
dcon::factory_id | f, | ||
dcon::nation_id | n, | ||
float | expected_min_wage | ||
) |
Definition at line 1666 of file economy.cpp.
bool economy::valid_artisan_good | ( | sys::state & | state, |
dcon::nation_id | n, | ||
dcon::commodity_id | cid | ||
) |
Definition at line 454 of file economy.cpp.
|
constexpr |
Definition at line 494 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2048 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2034 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2050 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2036 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2049 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2035 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2052 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2038 of file economy.cpp.
|
inlineconstexpr |
Definition at line 121 of file economy.hpp.
|
inlineconstexpr |
Definition at line 123 of file economy.hpp.
|
inlineconstexpr |
Definition at line 467 of file economy.cpp.
|
inlineconstexpr |
Definition at line 579 of file constants.hpp.
|
inlineconstexpr |
Definition at line 122 of file economy.hpp.
|
inlineconstexpr |
Definition at line 120 of file economy.hpp.
|
inlineconstexpr |
Definition at line 124 of file economy.hpp.
|
inlineconstexpr |
Definition at line 2053 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2039 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2054 of file economy.cpp.
|
inlineconstexpr |
Definition at line 2040 of file economy.cpp.
|
inlineconstexpr |
Definition at line 92 of file economy.hpp.
|
inlineconstexpr |
Definition at line 94 of file economy.hpp.
|
inlineconstexpr |
Definition at line 93 of file economy.hpp.
|
inlineconstexpr |
Definition at line 95 of file economy.hpp.
|
inlineconstexpr |
Definition at line 96 of file economy.hpp.