diff options
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 |
commit | 177a0051eceb657ad838048d9532e306e18ce4e5 (patch) | |
tree | 60101bdfe575a25c9ef10cdcc52691140795405d /src/openvic-simulation/economy/Good.cpp | |
parent | e79d3e0416e62883c697225b090d03abafc7bb30 (diff) |
Case insensitive modifiers & added more
Diffstat (limited to 'src/openvic-simulation/economy/Good.cpp')
-rw-r--r-- | src/openvic-simulation/economy/Good.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp index 435d860..d674a68 100644 --- a/src/openvic-simulation/economy/Good.cpp +++ b/src/openvic-simulation/economy/Good.cpp @@ -93,11 +93,11 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) { bool GoodManager::generate_modifiers(ModifierManager& modifier_manager) const { bool ret = true; - const auto good_modifier = [this, &modifier_manager, &ret](std::string_view name, bool positive_good) -> void { + const auto good_modifier = [this, &modifier_manager, &ret](std::string_view name, bool is_positive_good) -> void { ret &= modifier_manager.register_complex_modifier(name); for (Good const& good : get_goods()) { ret &= modifier_manager.add_modifier_effect( - StringUtils::append_string_views(name, "_", good.get_identifier()), positive_good + ModifierManager::get_flat_identifier(name, good.get_identifier()), is_positive_good ); } }; |