diff --git a/classes/deck/deck.gd b/classes/deck/deck.gd index f946253..88ca228 100644 --- a/classes/deck/deck.gd +++ b/classes/deck/deck.gd @@ -156,9 +156,10 @@ func group_nodes(nodes_to_group: Array) -> Deck: var outgoing_connections := node.outgoing_connections.duplicate(true) for from_port: int in outgoing_connections: - for connection: Dictionary in outgoing_connections[from_port]: - if !(connection.keys()[0] in node_ids_to_keep): - disconnect_nodes(node._id, connection.keys()[0], from_port, connection.values()[0]) + for to_node: String in outgoing_connections[from_port]: + for to_port: int in outgoing_connections[from_port][to_node]: + if !(to_node in node_ids_to_keep): + disconnect_nodes(node._id, to_node, from_port, to_port) var incoming_connections := node.incoming_connections.duplicate(true)