From 177a0051eceb657ad838048d9532e306e18ce4e5 Mon Sep 17 00:00:00 2001 From: wvpm <24685035+wvpm@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:12:43 +0100 Subject: Case insensitive modifiers & added more --- src/openvic-simulation/economy/Good.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/openvic-simulation/economy/Good.cpp') 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 ); } }; -- cgit v1.2.3-56-ga3b1