summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script/visual_script.cpp')
-rw-r--r--modules/visual_script/visual_script.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 5036840413..471f43cadd 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -30,14 +30,14 @@
#include "visual_script.h"
-#include <stdint.h>
-
#include "core/core_string_names.h"
#include "core/os/os.h"
#include "core/project_settings.h"
#include "scene/main/node.h"
#include "visual_script_nodes.h"
+#include <stdint.h>
+
//used by editor, this is not really saved
void VisualScriptNode::set_breakpoint(bool p_breakpoint) {
breakpoint = p_breakpoint;
@@ -198,7 +198,7 @@ void VisualScript::remove_function(const StringName &p_name) {
for (Map<int, Function::NodeData>::Element *E = functions[p_name].nodes.front(); E; E = E->next()) {
- E->get().node->disconnect_compat("ports_changed", this, "_node_ports_changed");
+ E->get().node->disconnect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed));
E->get().node->scripts_used.erase(this);
}
@@ -340,7 +340,7 @@ void VisualScript::add_node(const StringName &p_func, int p_id, const Ref<Visual
nd.pos = p_pos;
Ref<VisualScriptNode> vsn = p_node;
- vsn->connect_compat("ports_changed", this, "_node_ports_changed", varray(p_id));
+ vsn->connect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed), varray(p_id));
vsn->scripts_used.insert(this);
vsn->validate_input_default_values(); // Validate when fully loaded
@@ -389,7 +389,7 @@ void VisualScript::remove_node(const StringName &p_func, int p_id) {
func.function_id = -1; //revert to invalid
}
- func.nodes[p_id].node->disconnect_compat("ports_changed", this, "_node_ports_changed");
+ func.nodes[p_id].node->disconnect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed));
func.nodes[p_id].node->scripts_used.erase(this);
func.nodes.erase(p_id);
@@ -1373,8 +1373,6 @@ Dictionary VisualScript::_get_data() const {
void VisualScript::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_node_ports_changed"), &VisualScript::_node_ports_changed);
-
ClassDB::bind_method(D_METHOD("add_function", "name"), &VisualScript::add_function);
ClassDB::bind_method(D_METHOD("has_function", "name"), &VisualScript::has_function);
ClassDB::bind_method(D_METHOD("remove_function", "name"), &VisualScript::remove_function);