aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military
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/military
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/military')
-rw-r--r--src/openvic-simulation/military/UnitType.cpp7
1 files changed, 5 insertions, 2 deletions
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, "$")
);
};