diff options
author | hop311 <hop3114@gmail.com> | 2024-09-25 23:10:21 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-10-05 22:48:41 +0200 |
commit | 4f9fd8a327b6de5fb32792a07453e9a2e245dc84 (patch) | |
tree | dc92397c8d16df21d612ad5159b8fd9b19353eb7 /src/openvic-simulation/military | |
parent | fb6b9439c219239691eb0201ec3f431b5dfe4893 (diff) |
Add ModifierEffect targets
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r-- | src/openvic-simulation/military/UnitType.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openvic-simulation/military/UnitType.cpp b/src/openvic-simulation/military/UnitType.cpp index 71bc5c3..bb227fb 100644 --- a/src/openvic-simulation/military/UnitType.cpp +++ b/src/openvic-simulation/military/UnitType.cpp @@ -321,17 +321,18 @@ bool UnitTypeManager::generate_modifiers(ModifierManager& modifier_manager) cons const auto generate_stat_modifiers = [&modifier_manager, &ret]( std::string_view identifier, UnitType::branch_t branch ) -> void { + using enum ModifierEffect::format_t; + using enum ModifierEffect::target_t; + const auto stat_modifier = [&modifier_manager, &ret, &identifier]( std::string_view suffix, bool is_positive_good, ModifierEffect::format_t format, std::string_view localisation_key ) -> 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, COUNTRY, StringUtils::append_string_views("$", identifier, "$: $", localisation_key, "$") ); }; - using enum ModifierEffect::format_t; - ret &= modifier_manager.register_complex_modifier(identifier); stat_modifier("attack", true, RAW_DECIMAL, "ATTACK"); |