diff options
author | zaaarf <me@zaaarf.foo> | 2024-05-15 10:57:21 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-07-07 01:11:10 +0200 |
commit | 71b846dc5dd1ac49626c8b479571050224a4cca1 (patch) | |
tree | d38d333b55e6ec42c28adf4554153aad378159fc /src/openvic-simulation/misc/Modifier.cpp | |
parent | 8c8b9349e26b4f606e18810a201ff378eaac19b2 (diff) |
Update OpenVicProject/OpenVic-Dataloader@4a49007dryad
Update .clang-format categories
Move type_name and SelfType functioanlity to utility/Getters
Diffstat (limited to 'src/openvic-simulation/misc/Modifier.cpp')
-rw-r--r-- | src/openvic-simulation/misc/Modifier.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/openvic-simulation/misc/Modifier.cpp b/src/openvic-simulation/misc/Modifier.cpp index d4aaee2..25d0cf9 100644 --- a/src/openvic-simulation/misc/Modifier.cpp +++ b/src/openvic-simulation/misc/Modifier.cpp @@ -2,6 +2,10 @@ #include <string> +#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp> + +#include <dryad/node.hpp> + #include "openvic-simulation/types/OrderedContainers.hpp" #include "openvic-simulation/utility/TslHelper.hpp" @@ -403,9 +407,9 @@ key_value_callback_t ModifierManager::_modifier_effect_callback( std::string_view key, ast::NodeCPtr value ) -> bool { ModifierEffect const* effect = get_modifier_effect_by_identifier(key); - if (effect != nullptr && value->is_type<ast::IdentifierNode>()) { + if (effect != nullptr && dryad::node_has_kind<ast::IdentifierValue>(value)) { return add_modifier_cb(effect, value); - } else if (complex_modifiers.contains(key) && value->is_derived_from<ast::AbstractListNode>()) { + } else if (complex_modifiers.contains(key) && dryad::node_has_kind<ast::ListValue>(value)) { if (key == "rebel_org_gain") { //because of course there's a special one std::string_view faction_identifier; ast::NodeCPtr value_node = nullptr; |