From 0944c8e7158c746a5d6d4a2e15671ad3f4474cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sat, 25 Nov 2023 14:32:10 +0300 Subject: [PATCH] remove deprecated and unused methods on deck node --- classes/deck/deck_node.gd | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/classes/deck/deck_node.gd b/classes/deck/deck_node.gd index 98df43e..a9c4778 100644 --- a/classes/deck/deck_node.gd +++ b/classes/deck/deck_node.gd @@ -104,7 +104,7 @@ func send(from_output_port: int, data: DeckType, extra_data: Array = []) -> void for connection in outgoing_connections[from_output_port]: connection = connection as Dictionary # key is node uuid - # value is GLOBAL port on destination node + # value is input port on destination node for node in connection: get_node(node)._receive(connection[node], data, extra_data) @@ -114,15 +114,6 @@ func _receive(to_input_port: int, data: DeckType, extra_data: Array = []) -> voi pass -## @deprecated -func add_outgoing_connection_to_port(output_port: int, to_node: String, to_input_port: int) -> void: - add_outgoing_connection( - get_global_port_idx_from_output(output_port), - to_node, - get_node(to_node).get_global_port_idx_from_input(to_input_port) - ) - - ## Add a connection from the output port at [param from_port] to [param to_node]'s input port ## at [param to_port]. func add_outgoing_connection(from_port: int, to_node: String, to_port: int) -> void: @@ -190,11 +181,6 @@ func remove_incoming_connection(to_port: int) -> void: incoming_connection_removed.emit(to_port) -## @deprecated -func remove_outgoing_connection_from_port(output_port: int, connection_hash: int) -> void: - remove_outgoing_connection(get_global_port_idx_from_output(output_port), connection_hash) - - ## Returns a list of all input ports. func get_input_ports() -> Array[Port]: return ports.filter( @@ -248,26 +234,6 @@ func get_port_type_idx_from_global(idx: int) -> int: return ports[idx].index_of_type -## Returns the amount of outgoing connections on output port at [param port]. -func get_outgoing_connection_count(port: int) -> int: - return (outgoing_connections[port] as Array).size() - - -## @deprecated -func get_outgoing_connection_count_on_output(port: int) -> int: - return get_outgoing_connection_count(get_global_port_idx_from_output(port)) - - -## Returns [code]true[/code] if the node has an incoming connection in input port at [param port]. -func has_incoming_connection(port: int) -> bool: - return incoming_connections.has(port) - - -## @deprecated -func has_incoming_connection_on_input(port: int) -> bool: - return has_incoming_connection(get_global_port_idx_from_input(port)) - - ## Returns the list of all ports. func get_all_ports() -> Array[Port]: return ports