aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-01-12 21:53:46 +0100
committer GitHub <noreply@github.com>2024-01-12 21:53:46 +0100
commit7b5a960ee9fce4241f83e5217bcf8f43af99f330 (patch)
tree60101bdfe575a25c9ef10cdcc52691140795405d /src/openvic-simulation/pop
parente79d3e0416e62883c697225b090d03abafc7bb30 (diff)
parent177a0051eceb657ad838048d9532e306e18ce4e5 (diff)
Merge pull request #126 from OpenVicProject/improve_modifiers
Case insensitive modifiers & added more
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index d15bd2e..5afcb18 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -319,15 +319,17 @@ bool PopManager::load_pop_into_vector(
bool PopManager::generate_modifiers(ModifierManager& modifier_manager) const {
bool ret = true;
+
for (Strata const& strata : get_stratas()) {
- const auto strata_modifier = [&modifier_manager, &ret, &strata](std::string_view suffix, bool positive_good) -> void {
+ const auto strata_modifier = [&modifier_manager, &ret, &strata](
+ std::string_view suffix, bool is_positive_good
+ ) -> void {
ret &= modifier_manager.add_modifier_effect(
- StringUtils::append_string_views(strata.get_identifier(), suffix), positive_good
+ StringUtils::append_string_views(strata.get_identifier(), suffix), is_positive_good
);
};
strata_modifier("_income_modifier", true);
- strata_modifier("_savings_modifier", true);
strata_modifier("_vote", true);
strata_modifier("_life_needs", false);