aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/Modifier.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/Modifier.hpp')
-rw-r--r--src/openvic-simulation/Modifier.hpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/openvic-simulation/Modifier.hpp b/src/openvic-simulation/Modifier.hpp
index 0c4e636..2e1b03a 100644
--- a/src/openvic-simulation/Modifier.hpp
+++ b/src/openvic-simulation/Modifier.hpp
@@ -92,17 +92,6 @@ namespace OpenVic {
IdentifierRegistry<ModifierEffect> modifier_effects;
IdentifierRegistry<Modifier> modifiers;
- NodeTools::node_callback_t _expect_modifier_value_and_keys(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_map_t&& key_map) const;
-
- template<typename... Args>
- NodeTools::node_callback_t _expect_modifier_value_and_keys(
- NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_map_t&& key_map,
- std::string_view key, NodeTools::dictionary_entry_t::expected_count_t expected_count, NodeTools::node_callback_t callback,
- Args... args) const {
- NodeTools::add_key_map_entry(key_map, key, expected_count, callback);
- return _expect_modifier_value_and_keys(modifier_callback, std::move(key_map), args...);
- }
-
public:
ModifierManager();
@@ -114,11 +103,28 @@ namespace OpenVic {
bool setup_modifier_effects();
- NodeTools::node_callback_t expect_modifier_value(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_value_callback_t default_callback) const;
+ NodeTools::node_callback_t expect_modifier_value_and_default(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_value_callback_t default_callback) const;
+ NodeTools::node_callback_t expect_modifier_value(NodeTools::callback_t<ModifierValue&&> modifier_callback) const;
+
+ NodeTools::node_callback_t expect_modifier_value_and_key_map_and_default(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_value_callback_t default_callback, NodeTools::key_map_t&& key_map) const;
+ NodeTools::node_callback_t expect_modifier_value_and_key_map(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_map_t&& key_map) const;
template<typename... Args>
+ NodeTools::node_callback_t expect_modifier_value_and_key_map_and_default(
+ NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_value_callback_t default_callback, NodeTools::key_map_t&& key_map,
+ std::string_view key, NodeTools::dictionary_entry_t::expected_count_t expected_count, NodeTools::node_callback_t callback,
+ Args... args) const {
+ NodeTools::add_key_map_entry(key_map, key, expected_count, callback);
+ return expect_modifier_value_and_key_map_and_default(modifier_callback, default_callback, std::move(key_map), args...);
+ }
+
+ template<typename... Args>
+ NodeTools::node_callback_t expect_modifier_value_and_keys_and_default(NodeTools::callback_t<ModifierValue&&> modifier_callback, NodeTools::key_value_callback_t default_callback, Args... args) const {
+ return expect_modifier_value_and_key_map_and_default(modifier_callback, default_callback, {}, args...);
+ }
+ template<typename... Args>
NodeTools::node_callback_t expect_modifier_value_and_keys(NodeTools::callback_t<ModifierValue&&> modifier_callback, Args... args) const {
- return _expect_modifier_value_and_keys(modifier_callback, {}, args...);
+ return expect_modifier_value_and_key_map_and_default(modifier_callback, NodeTools::key_value_invalid_callback, {}, args...);
}
};
}