diff options
author | hop311 <hop3114@gmail.com> | 2024-10-23 01:21:25 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-10-23 01:21:25 +0200 |
commit | eca580673aec46cd6e730e7307c13afb858efd94 (patch) | |
tree | 8ad859f8c3b4cad664a7a3e4cd93edbbed60bb5f /src/openvic-simulation/modifier/ModifierEffect.cpp | |
parent | c88cf59997529cbca008f9a2b629822de9deaa2a (diff) |
[Work-In-Progress] Add ModifierEffectMappingmodifier-effect-mappings
Diffstat (limited to 'src/openvic-simulation/modifier/ModifierEffect.cpp')
-rw-r--r-- | src/openvic-simulation/modifier/ModifierEffect.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/openvic-simulation/modifier/ModifierEffect.cpp b/src/openvic-simulation/modifier/ModifierEffect.cpp index 2ffb9a5..37822c3 100644 --- a/src/openvic-simulation/modifier/ModifierEffect.cpp +++ b/src/openvic-simulation/modifier/ModifierEffect.cpp @@ -41,9 +41,18 @@ std::string ModifierEffect::make_default_modifier_effect_localisation_key(std::s } ModifierEffect::ModifierEffect( - std::string_view new_identifier, bool new_positive_good, format_t new_format, target_t new_targets, + std::string_view new_identifier, + bool new_positive_good, + format_t new_format, + target_t new_targets, + std::string_view new_mapping_key, std::string_view new_localisation_key -) : HasIdentifier { new_identifier }, positive_good { new_positive_good }, format { new_format }, targets { new_targets }, +) : HasIdentifier { new_identifier }, + positive_good { new_positive_good }, + format { new_format }, + targets { new_targets }, + mapping_key { new_mapping_key.empty() ? new_identifier : new_mapping_key }, localisation_key { - new_localisation_key.empty() ? make_default_modifier_effect_localisation_key(new_identifier) : new_localisation_key + // mapping_key will have been initialised by this point as it's before localisation_key in the struct's declaration + new_localisation_key.empty() ? make_default_modifier_effect_localisation_key(mapping_key) : new_localisation_key } {} |