aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/research/Technology.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-09-20 14:11:27 +0200
committer GitHub <noreply@github.com>2024-09-20 14:11:27 +0200
commit89b1333b1edff6c08750bd836ae92eccbe06e3bd (patch)
treeed4e867e2c099b027da2e2205b99575edae7b561 /src/openvic-simulation/research/Technology.cpp
parentf0814926f675d6ecf889d8add410b1c37f625b29 (diff)
parent5550b237fa9b6f8c6a86eea0de9d32e28a626dc7 (diff)
Merge pull request #201 from OpenVicProject/rule-modifier-locale-keys
ModifierEffect and Rule localisation keys
Diffstat (limited to 'src/openvic-simulation/research/Technology.cpp')
-rw-r--r--src/openvic-simulation/research/Technology.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/research/Technology.cpp b/src/openvic-simulation/research/Technology.cpp
index 89c4a71..847c4b0 100644
--- a/src/openvic-simulation/research/Technology.cpp
+++ b/src/openvic-simulation/research/Technology.cpp
@@ -196,12 +196,14 @@ bool TechnologyManager::load_technologies_file(
}
bool TechnologyManager::generate_modifiers(ModifierManager& modifier_manager) const {
+ using enum ModifierEffect::format_t;
+
bool ret = true;
for (TechnologyFolder const& folder : get_technology_folders()) {
- ret &= modifier_manager.add_modifier_effect(
- StringUtils::append_string_views(folder.get_identifier(), "_research_bonus"), true
- );
+ const std::string modifier_identifier = StringUtils::append_string_views(folder.get_identifier(), "_research_bonus");
+
+ ret &= modifier_manager.add_modifier_effect(modifier_identifier, true, PROPORTION_DECIMAL, modifier_identifier);
}
return ret;