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/misc/Modifier.hpp | |
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/misc/Modifier.hpp')
-rw-r--r-- | src/openvic-simulation/misc/Modifier.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/openvic-simulation/misc/Modifier.hpp b/src/openvic-simulation/misc/Modifier.hpp index bd72a1e..f3cc0f6 100644 --- a/src/openvic-simulation/misc/Modifier.hpp +++ b/src/openvic-simulation/misc/Modifier.hpp @@ -22,10 +22,13 @@ namespace OpenVic { */ const bool PROPERTY_CUSTOM_PREFIX(positive_good, is); const format_t PROPERTY(format); + std::string PROPERTY(localisation_key); // TODO - format/precision, e.g. 80% vs 0.8 vs 0.800, 2 vs 2.0 vs 200% - ModifierEffect(std::string_view new_identifier, bool new_positive_good, format_t new_format); + ModifierEffect( + std::string_view new_identifier, bool new_positive_good, format_t new_format, std::string_view new_localisation_key + ); public: ModifierEffect(ModifierEffect&&) = default; @@ -133,7 +136,8 @@ namespace OpenVic { public: bool add_modifier_effect( std::string_view identifier, bool positive_good, - ModifierEffect::format_t format = ModifierEffect::format_t::PROPORTION_DECIMAL + ModifierEffect::format_t format = ModifierEffect::format_t::PROPORTION_DECIMAL, + std::string_view localisation_key = {} ); bool register_complex_modifier(std::string_view identifier); |