From 5550b237fa9b6f8c6a86eea0de9d32e28a626dc7 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 18 Sep 2024 23:07:28 +0100 Subject: ModifierEffect and Rule localisation keys --- src/openvic-simulation/military/UnitType.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/openvic-simulation/military') diff --git a/src/openvic-simulation/military/UnitType.cpp b/src/openvic-simulation/military/UnitType.cpp index d4ffbee..1c111cc 100644 --- a/src/openvic-simulation/military/UnitType.cpp +++ b/src/openvic-simulation/military/UnitType.cpp @@ -318,12 +318,15 @@ bool UnitTypeManager::load_unit_type_file( bool UnitTypeManager::generate_modifiers(ModifierManager& modifier_manager) const { bool ret = true; - const auto generate_stat_modifiers = [&modifier_manager, &ret](std::string_view identifier, UnitType::branch_t branch) -> void { + const auto generate_stat_modifiers = [&modifier_manager, &ret]( + std::string_view identifier, UnitType::branch_t branch + ) -> void { const auto stat_modifier = [&modifier_manager, &ret, &identifier]( std::string_view suffix, bool is_positive_good, ModifierEffect::format_t format ) -> void { ret &= modifier_manager.add_modifier_effect( - ModifierManager::get_flat_identifier(identifier, suffix), is_positive_good, format + ModifierManager::get_flat_identifier(identifier, suffix), is_positive_good, format, + StringUtils::append_string_views("$", identifier, "$: $", suffix, "$") ); }; -- cgit v1.2.3-56-ga3b1