4#include "dcon_generated.hpp"
29static_assert(
sizeof(building_information) == 104);
42static_assert(
sizeof(building_information) ==
75 return "railroad_level";
79 return "naval_base_level";
83 return "university_level";
104static_assert(
sizeof(global_economy_state) ==
118constexpr inline dcon::commodity_id
money(0);
float estimate_reparations_income(sys::state &state, dcon::nation_id n)
bool state_contains_factory(sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
void initialize(sys::state &state)
float global_market_commodity_daily_increase(sys::state &state, dcon::commodity_id c)
dcon::modifier_id get_province_immigrator_modifier(sys::state &state)
constexpr float subsistence_score_life
float estimate_subsidy_spending(sys::state &state, dcon::nation_id n)
void populate_effective_prices(sys::state &state, dcon::nation_id n)
float government_consumption(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
float estimate_social_spending(sys::state &state, dcon::nation_id n)
construction_status province_building_construction(sys::state &state, dcon::province_id p, province_building_type t)
float rgo_total_effective_size(sys::state &state, dcon::nation_id n, dcon::province_id p)
float nation_total_imports(sys::state &state, dcon::nation_id n)
float factory_type_input_cost(sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
bool state_contains_constructed_factory(sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
float estimate_tariff_income(sys::state &state, dcon::nation_id n)
float factory_desired_raw_profit(dcon::factory_fat_id fac, float spendings)
bool has_building(sys::state const &state, dcon::state_instance_id si, dcon::factory_type_id fac)
float factory_max_employment(sys::state const &state, dcon::factory_id f)
void update_factory_employment(sys::state &state)
bool is_bankrupt_debtor_to(sys::state &state, dcon::nation_id debt_holder, dcon::nation_id debtor)
int32_t state_factory_count(sys::state &state, dcon::state_instance_id sid, dcon::nation_id n)
std::string_view province_building_type_get_name(economy::province_building_type v)
float estimate_diplomatic_balance(sys::state &state, dcon::nation_id n)
void prune_factories(sys::state &state)
constexpr uint32_t gdp_history_length
float estimate_pop_payouts_by_income_type(sys::state &state, dcon::nation_id n, culture::income_type in)
float estimate_domestic_investment(sys::state &state, dcon::nation_id n)
constexpr float subsistence_score_total
int32_t previous_price_record_index(sys::state &state)
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 factory_min_input_available(sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
float estimate_overseas_penalty_spending(sys::state &state, dcon::nation_id n)
float nation_factory_consumption(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
float base_artisan_profit(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
commodity_production_type get_commodity_production_type(sys::state &state, dcon::commodity_id c)
bool has_factory(sys::state const &state, dcon::state_instance_id si)
float max_loan(sys::state &state, dcon::nation_id n)
float estimate_construction_spending(sys::state &state, dcon::nation_id n)
float estimate_war_subsidies_income(sys::state &state, dcon::nation_id n)
construction_status factory_upgrade(sys::state &state, dcon::factory_id f)
float gdp_adjusted(sys::state &state, dcon::nation_id n)
void presimulate(sys::state &state)
void update_rgo_employment(sys::state &state)
float estimate_land_spending(sys::state &state, dcon::nation_id n)
float rgo_total_employment(sys::state &state, dcon::nation_id n, dcon::province_id p)
commodity_production_type
float estimate_daily_income(sys::state &state, dcon::nation_id n)
constexpr uint32_t price_history_length
float rgo_total_max_employment(sys::state &state, dcon::nation_id n, dcon::province_id p)
void regenerate_unsaved_values(sys::state &state)
float artisan_scale_limit(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
constexpr dcon::commodity_id money(0)
bool can_take_loans(sys::state &state, dcon::nation_id n)
int32_t factory_priority(sys::state const &state, dcon::factory_id f)
dcon::modifier_id get_province_selector_modifier(sys::state &state)
float unit_construction_progress(sys::state &state, dcon::province_land_construction_id c)
constexpr float factory_closed_threshold
int32_t most_recent_price_record_index(sys::state &state)
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)
void try_add_factory_to_state(sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t)
bool nation_is_constructing_factories(sys::state &state, dcon::nation_id n)
float pop_income(sys::state &state, dcon::pop_id p)
float rgo_effective_size(sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
constexpr float subsistence_score_luxury
float pop_factory_min_wage(sys::state &state, dcon::nation_id n, float min_wage_factor)
float estimate_war_subsidies_spending(sys::state &state, dcon::nation_id n)
float factory_max_production_scale(sys::state &state, dcon::factory_fat_id fac, float mobilization_impact, bool occupied)
float commodity_daily_production_amount(sys::state &state, dcon::commodity_id c)
float estimate_war_subsidies(sys::state &state, dcon::nation_id n)
std::string_view province_building_type_get_level_text(economy::province_building_type v)
constexpr int32_t max_building_types
float rgo_expected_worker_norm_profit(sys::state &state, dcon::province_id p, dcon::nation_id n, dcon::commodity_id c)
constexpr float subsistence_factor
constexpr float production_scale_delta
bool factory_is_profitable(sys::state const &state, dcon::factory_id f)
auto desired_needs_spending(sys::state const &state, T pop_indices)
float estimate_reparations_spending(sys::state &state, dcon::nation_id n)
int32_t most_recent_gdp_record_index(sys::state &state)
float estimate_naval_spending(sys::state &state, dcon::nation_id n)
float subsistence_max_pseudoemployment(sys::state &state, dcon::nation_id n, dcon::province_id p)
void go_bankrupt(sys::state &state, dcon::nation_id n)
void bound_budget_settings(sys::state &state, dcon::nation_id n)
float factory_secondary_employment(sys::state const &state, dcon::factory_id f)
float rgo_max_employment(sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
float pop_min_wage_factor(sys::state &state, dcon::nation_id n)
void resolve_constructions(sys::state &state)
float estimate_tax_income_by_strata(sys::state &state, dcon::nation_id n, culture::pop_strata ps)
float pop_farmer_min_wage(sys::state &state, dcon::nation_id n, float min_wage_factor)
float factory_total_employment(sys::state const &state, dcon::factory_id f)
float estimate_stockpile_filling_spending(sys::state &state, dcon::nation_id n)
constexpr float rgo_owners_cut
float stockpile_commodity_daily_increase(sys::state &state, dcon::commodity_id c, dcon::nation_id n)
float pop_laborer_min_wage(sys::state &state, dcon::nation_id n, float min_wage_factor)
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_input_total_cost(sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
float rgo_full_production_quantity(sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
float interest_payment(sys::state &state, dcon::nation_id n)
float factory_e_input_total_cost(sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
void daily_update(sys::state &state, bool initiate_buildings)
float factory_type_output_cost(sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
void set_factory_priority(sys::state &state, dcon::factory_id f, int32_t priority)
float factory_primary_employment(sys::state const &state, dcon::factory_id f)
bool nation_has_closed_factories(sys::state &state, dcon::nation_id n)
float get_artisan_distribution_slow(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
float factory_output_multiplier(sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p)
float nation_pop_consumption(sys::state &state, dcon::nation_id n, dcon::commodity_id c)
float factory_min_e_input_available(sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
float factory_type_build_cost(sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
int32_t previous_gdp_record_index(sys::state &state)
constexpr float subsistence_score_everyday
float estimate_gold_income(sys::state &state, dcon::nation_id n)
bool is_under_construction
dcon::modifier_id selector_modifier
building_information building_definitions[max_building_types]
dcon::modifier_id immigrator_modifier
dcon::factory_type_id type
dcon::factory_type_id type