aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-01-10 21:12:43 +0100
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-01-12 21:35:39 +0100
commit177a0051eceb657ad838048d9532e306e18ce4e5 (patch)
tree60101bdfe575a25c9ef10cdcc52691140795405d /src/openvic-simulation/pop
parente79d3e0416e62883c697225b090d03abafc7bb30 (diff)
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);