remove deprecated and unused methods on deck node

This commit is contained in:
Lera Elvoé 2023-11-25 14:32:10 +03:00
parent 09deeccb60
commit 0944c8e715
No known key found for this signature in database

View file

@ -104,7 +104,7 @@ func send(from_output_port: int, data: DeckType, extra_data: Array = []) -> void
for connection in outgoing_connections[from_output_port]: for connection in outgoing_connections[from_output_port]:
connection = connection as Dictionary connection = connection as Dictionary
# key is node uuid # key is node uuid
# value is GLOBAL port on destination node # value is input port on destination node
for node in connection: for node in connection:
get_node(node)._receive(connection[node], data, extra_data) 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 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 ## Add a connection from the output port at [param from_port] to [param to_node]'s input port
## at [param to_port]. ## at [param to_port].
func add_outgoing_connection(from_port: int, to_node: String, to_port: int) -> void: 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) 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. ## Returns a list of all input ports.
func get_input_ports() -> Array[Port]: func get_input_ports() -> Array[Port]:
return ports.filter( return ports.filter(
@ -248,26 +234,6 @@ func get_port_type_idx_from_global(idx: int) -> int:
return ports[idx].index_of_type 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. ## Returns the list of all ports.
func get_all_ports() -> Array[Port]: func get_all_ports() -> Array[Port]:
return ports return ports