From 18b83f5b26a2786f963767662a8117bbd254e2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Thu, 14 Mar 2024 06:27:49 +0000 Subject: [PATCH] fix value callback usage on output ports (#102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #100 Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/102 Co-authored-by: Lera ElvoƩ Co-committed-by: Lera ElvoƩ --- classes/deck/nodes/general/bool_constant.gd | 5 +---- classes/deck/nodes/general/expression_node.gd | 2 +- classes/deck/nodes/general/get_deck_var.gd | 2 +- classes/deck/nodes/general/string_constant.gd | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/classes/deck/nodes/general/bool_constant.gd b/classes/deck/nodes/general/bool_constant.gd index 099a6d3..00908f8 100644 --- a/classes/deck/nodes/general/bool_constant.gd +++ b/classes/deck/nodes/general/bool_constant.gd @@ -18,7 +18,4 @@ func _init() -> void: func _value_request(_from_port: int) -> Variant: - if ports[0].value_callback.get_object(): - return ports[0].value_callback.call() - else: - return ports[0].value + return ports[0].value diff --git a/classes/deck/nodes/general/expression_node.gd b/classes/deck/nodes/general/expression_node.gd index 523fd35..9724744 100644 --- a/classes/deck/nodes/general/expression_node.gd +++ b/classes/deck/nodes/general/expression_node.gd @@ -28,7 +28,7 @@ func _init(): func parse(input: Dictionary) -> Variant: - var text = get_output_ports()[0].value_callback.call() + var text = get_output_ports()[0].value var err = expr.parse(text, ["deck_var", "input"]) if err != OK: diff --git a/classes/deck/nodes/general/get_deck_var.gd b/classes/deck/nodes/general/get_deck_var.gd index 40419c6..9be08cf 100644 --- a/classes/deck/nodes/general/get_deck_var.gd +++ b/classes/deck/nodes/general/get_deck_var.gd @@ -17,5 +17,5 @@ func _init() -> void: func _value_request(_from_port: int) -> Variant: - var key = ports[0].value_callback.call() + var key = ports[0].value return _belonging_to.variable_stack.get(key) diff --git a/classes/deck/nodes/general/string_constant.gd b/classes/deck/nodes/general/string_constant.gd index 5cf1f13..778f968 100644 --- a/classes/deck/nodes/general/string_constant.gd +++ b/classes/deck/nodes/general/string_constant.gd @@ -17,7 +17,4 @@ func _init() -> void: ) func _value_request(_from_port: int) -> Variant: - if ports[0].value_callback.get_object(): - return ports[0].value_callback.call() - else: - return ports[0].value + return ports[0].value