miggor-StreamGraph/graph_node_renderer
Lera Elvoé 51652ef277 add port usage type to Port (#69)
first part of addressing #59

every `Port` now has a `usage_type` field that indicates whether it can be used for triggers (eg. sending and receiving events), value requests, or both. `Deck` has an additional method to validate if a potential connection is legal, which checks for the following in order:

1. the source and target nodes are not the same node;
2. the port usage is valid (trigger to trigger, value to value, both to any);
3. the port types are compatible
4. the connection doesn't already exist

all node ports by default use the "both" usage, since that will be the most common use case (especially in cases where an input port can accept either a trigger and a value request but the output can only send one type), but it can be specified as an optional argument in `add_[input|output]_port()`

usage types are represented in the renderer by different port icons:

![image](/attachments/28d3cfe9-c62c-4dd4-937d-64dbe87cb205)

there is a reference implementation in the Compare Values and Twitch Chat Received nodes, since those were used as examples in #59. other nodes will be added as a separate PR later if this is merged, since behavior will vary greatly per node.

Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/69
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2024-02-21 04:08:36 +00:00
..
textures add port usage type to Port (#69) 2024-02-21 04:08:36 +00:00
about_dialog.gd Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
about_dialog.tscn Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
add_node_menu.gd fix crashes in add node menu with empty search results (#58) 2024-01-25 07:36:21 +00:00
add_node_menu.tscn add node menu (#3) 2023-11-23 06:38:10 +00:00
bottom_dock.gd add a bottom dock (#44) 2024-01-19 09:52:51 +00:00
bottom_dock.tscn add a bottom dock (#44) 2024-01-19 09:52:51 +00:00
debug_decks_list.gd Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
debug_decks_list.tscn Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
deck_holder_renderer.gd attempt to fix scene preload hell (#70) 2024-02-21 01:11:26 +00:00
deck_holder_renderer.tscn attempt to fix scene preload hell (#70) 2024-02-21 01:11:26 +00:00
deck_node_renderer_graph_node.gd add port usage type to Port (#69) 2024-02-21 04:08:36 +00:00
deck_node_renderer_graph_node.tscn attempt to fix scene preload hell (#70) 2024-02-21 01:11:26 +00:00
deck_renderer_graph_edit.gd add port usage type to Port (#69) 2024-02-21 04:08:36 +00:00
deck_renderer_graph_edit.tscn attempt to fix scene preload hell (#70) 2024-02-21 01:11:26 +00:00
default_theme.tres merge groups (#2) 2023-11-22 04:26:11 +00:00
logger_renderer.gd add a bottom dock (#44) 2024-01-19 09:52:51 +00:00
logger_renderer.tscn add a bottom dock (#44) 2024-01-19 09:52:51 +00:00
obs_websocket_setup_dialog.gd Implement a temporary system for saving Credentials. (#38) 2024-01-15 05:35:16 +00:00
obs_websocket_setup_dialog.tscn Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
tab_container_custom.gd fix closing tabs not showing the right content (#46) 2024-01-20 04:01:26 +00:00
tab_container_custom.tscn merge groups (#2) 2023-11-22 04:26:11 +00:00
twitch_setup_dialog.gd Twitch updates pt. 1 (#56) 2024-01-25 06:36:05 +00:00
twitch_setup_dialog.tscn Implement a temporary system for saving Credentials. (#38) 2024-01-15 05:35:16 +00:00
unsaved_changes_dialog.tscn Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
unsaved_changes_dialog_single_deck.gd Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
unsaved_changes_dialog_single_deck.tscn Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18) 2023-12-15 21:44:25 +00:00
variable_viewer.gd add temporary null handling to variable viewer 2024-02-12 11:08:38 +03:00
variable_viewer.tscn add a bottom dock (#44) 2024-01-19 09:52:51 +00:00