Skip to content

Commit 06e0b2e

Browse files
committed
tmp issues calculation
1 parent 83ebe36 commit 06e0b2e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/openvic-simulation/pop/Pop.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ void Pop::generate_political_distributions(InstanceManager const& instance_manag
131131
}
132132
}
133133
ideology_distribution.rescale(size);
134+
135+
issue_distribution.clear();
136+
for (auto const& [issue, conditional_weight] : type->get_issues()) {
137+
issue_distribution[issue] = conditional_weight.execute(instance_manager, this, this);
138+
}
139+
rescale_fixed_point_map(issue_distribution, size);
134140
}
135141

136142
bool Pop::convert_to_equivalent() {

src/openvic-simulation/scripts/Condition.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@ bool ConditionManager::setup_conditions() {
34893489
ret &= add_condition(
34903490
"unemployment",
34913491
_parse_condition_node_value_callback<fixed_point_t, COUNTRY | PROVINCE | POP>,
3492-
_execute_condition_node_unimplemented
3492+
_execute_condition_node_unimplemented_no_error
34933493
);
34943494
// Shows up in allow decision tooltips but is always false
34953495
// TODO - "unit_has_leader = no" is the same as "unit_has_leader = yes"
@@ -3849,7 +3849,7 @@ bool ConditionManager::setup_conditions() {
38493849
ret &= add_condition(
38503850
"is_state_religion",
38513851
_parse_condition_node_value_callback<bool, PROVINCE | POP>,
3852-
_execute_condition_node_unimplemented
3852+
_execute_condition_node_unimplemented_no_error
38533853
);
38543854
ret &= add_condition(
38553855
"life_rating",

0 commit comments

Comments
 (0)