diff options
author | hop311 <hop3114@gmail.com> | 2024-09-19 00:07:28 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-09-19 00:07:28 +0200 |
commit | 5550b237fa9b6f8c6a86eea0de9d32e28a626dc7 (patch) | |
tree | ed4e867e2c099b027da2e2205b99575edae7b561 /src/openvic-simulation/misc/Modifier.hpp | |
parent | f0814926f675d6ecf889d8add410b1c37f625b29 (diff) |
ModifierEffect and Rule localisation keysrule-modifier-locale-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); |