diff options
author | Hop311 <Hop3114@gmail.com> | 2024-09-20 14:11:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 14:11:27 +0200 |
commit | 89b1333b1edff6c08750bd836ae92eccbe06e3bd (patch) | |
tree | ed4e867e2c099b027da2e2205b99575edae7b561 /src/openvic-simulation/politics/Rebel.cpp | |
parent | f0814926f675d6ecf889d8add410b1c37f625b29 (diff) | |
parent | 5550b237fa9b6f8c6a86eea0de9d32e28a626dc7 (diff) |
Merge pull request #201 from OpenVicProject/rule-modifier-locale-keys
ModifierEffect and Rule localisation keys
Diffstat (limited to 'src/openvic-simulation/politics/Rebel.cpp')
-rw-r--r-- | src/openvic-simulation/politics/Rebel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/openvic-simulation/politics/Rebel.cpp b/src/openvic-simulation/politics/Rebel.cpp index fcb08c9..1c54f06 100644 --- a/src/openvic-simulation/politics/Rebel.cpp +++ b/src/openvic-simulation/politics/Rebel.cpp @@ -176,16 +176,23 @@ bool RebelManager::load_rebels_file( } bool RebelManager::generate_modifiers(ModifierManager& modifier_manager) const { + using enum ModifierEffect::format_t; + bool ret = true; + static constexpr std::string_view identifier = "rebel_org_gain"; static constexpr bool is_positive_good = false; + ret &= modifier_manager.register_complex_modifier(identifier); - ret &= modifier_manager.add_modifier_effect(ModifierManager::get_flat_identifier(identifier, "all"), is_positive_good); + ret &= modifier_manager.add_modifier_effect( + ModifierManager::get_flat_identifier(identifier, "all"), is_positive_good, PROPORTION_DECIMAL, "TECH_REBEL_ORG_GAIN" + ); for (RebelType const& rebel_type : get_rebel_types()) { ret &= modifier_manager.add_modifier_effect( - ModifierManager::get_flat_identifier(identifier, rebel_type.get_identifier()), is_positive_good + ModifierManager::get_flat_identifier(identifier, rebel_type.get_identifier()), is_positive_good, PROPORTION_DECIMAL, + StringUtils::append_string_views("$", rebel_type.get_identifier(), "_title$ $TECH_REBEL_ORG_GAIN$") ); } return ret; |