diff --git a/classes/deck/deck_node.gd b/classes/deck/deck_node.gd index e3176c0..e374bbd 100644 --- a/classes/deck/deck_node.gd +++ b/classes/deck/deck_node.gd @@ -167,11 +167,13 @@ func remove_outgoing_connection(from_port: int, to_node: String, to_port: int) - return var ports: Array = connections.get(to_node, []) as Array - if ports.is_empty(): - return - ports.erase(to_port) + if ports.is_empty(): + (outgoing_connections[from_port] as Dictionary).erase(to_node) + if (outgoing_connections[from_port] as Dictionary).is_empty(): + outgoing_connections.erase(from_port) + outgoing_connection_removed.emit(from_port)