fix remove node

This commit is contained in:
Lera Elvoé 2023-12-02 01:14:00 +03:00
parent b05b5561db
commit 440ec5bb2e
No known key found for this signature in database

View file

@ -110,10 +110,10 @@ func remove_node(uuid: String, remove_connections: bool = false) -> void:
if remove_connections:
var outgoing_connections := node.outgoing_connections.duplicate(true)
# FIXME: rework this to account for new outgoing connections format
for output_port: int in outgoing_connections:
for connection: Dictionary in outgoing_connections[output_port]:
disconnect_nodes(uuid, connection.keys()[0], output_port, connection.values()[0])
for to_node: String in outgoing_connections[output_port]:
for to_port: int in outgoing_connections[output_port][to_node]:
disconnect_nodes(uuid, to_node, output_port, to_port)
var incoming_connections := node.incoming_connections.duplicate(true)