aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc/Modifier.hpp
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-01-10 21:12:43 +0100
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-01-12 21:35:39 +0100
commit177a0051eceb657ad838048d9532e306e18ce4e5 (patch)
tree60101bdfe575a25c9ef10cdcc52691140795405d /src/openvic-simulation/misc/Modifier.hpp
parente79d3e0416e62883c697225b090d03abafc7bb30 (diff)
Case insensitive modifiers & added more
Diffstat (limited to 'src/openvic-simulation/misc/Modifier.hpp')
-rw-r--r--src/openvic-simulation/misc/Modifier.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/openvic-simulation/misc/Modifier.hpp b/src/openvic-simulation/misc/Modifier.hpp
index 033cc47..83efe9b 100644
--- a/src/openvic-simulation/misc/Modifier.hpp
+++ b/src/openvic-simulation/misc/Modifier.hpp
@@ -3,6 +3,9 @@
#include "openvic-simulation/scripts/ConditionScript.hpp"
#include "openvic-simulation/types/IdentifierRegistry.hpp"
+#include "dataloader/NodeTools.hpp"
+
+
namespace OpenVic {
struct ModifierManager;
@@ -115,8 +118,8 @@ namespace OpenVic {
* so instead we use an IdentifierInstanceRegistry (using std::unique_ptr's under the hood).
*/
private:
- IdentifierInstanceRegistry<ModifierEffect> IDENTIFIER_REGISTRY(modifier_effect);
- string_set_t complex_modifiers;
+ CaseInsensitiveIdentifierInstanceRegistry<ModifierEffect> IDENTIFIER_REGISTRY(modifier_effect);
+ case_insensitive_string_set_t complex_modifiers;
IdentifierRegistry<Modifier> IDENTIFIER_REGISTRY(event_modifier);
IdentifierRegistry<Modifier> IDENTIFIER_REGISTRY(static_modifier);
@@ -135,6 +138,8 @@ namespace OpenVic {
);
bool register_complex_modifier(std::string_view identifier);
+ static std::string
+ get_flat_identifier(const std::string_view complex_modifier_identifier, const std::string_view variant_identifier);
bool setup_modifier_effects();