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/politics/Rule.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/politics/Rule.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Rule.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvic-simulation/politics/Rule.hpp b/src/openvic-simulation/politics/Rule.hpp index db0c926..579299b 100644 --- a/src/openvic-simulation/politics/Rule.hpp +++ b/src/openvic-simulation/politics/Rule.hpp @@ -28,8 +28,11 @@ namespace OpenVic { private: const rule_group_t PROPERTY(group); + std::string PROPERTY(localisation_key); - Rule(std::string_view new_identifier, rule_group_t new_group, index_t new_index); + Rule( + std::string_view new_identifier, rule_group_t new_group, index_t new_index, std::string_view new_localisation_key + ); public: Rule(Rule&&) = default; @@ -81,7 +84,7 @@ namespace OpenVic { ordered_map<Rule::rule_group_t, size_t> rule_group_sizes; public: - bool add_rule(std::string_view identifier, Rule::rule_group_t group); + bool add_rule(std::string_view identifier, Rule::rule_group_t group, std::string_view localisation_key = {}); bool setup_rules(BuildingTypeManager const& building_type_manager); |