From a97bb5e947b898fa63bab95e7dd67b0341d7f6c3 Mon Sep 17 00:00:00 2001 From: Jowan-Spooner Date: Fri, 14 Jun 2024 10:56:22 +0200 Subject: [PATCH] Small fixes --- .../Modules/Character/node_portrait_container.gd | 4 ++-- .../dialogic/Modules/Character/subsystem_containers.gd | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/dialogic/Modules/Character/node_portrait_container.gd b/addons/dialogic/Modules/Character/node_portrait_container.gd index 6aab58f17..77bb5d978 100644 --- a/addons/dialogic/Modules/Character/node_portrait_container.gd +++ b/addons/dialogic/Modules/Character/node_portrait_container.gd @@ -109,10 +109,10 @@ func update_portrait_transforms() -> void: return match pivot_mode: - pivot_offset = _get_origin_position() PivotModes.AT_ORIGIN: - pivot_offset = size*pivot_value + pivot_offset = _get_origin_position() PivotModes.PERCENTAGE: + pivot_offset = size*pivot_value PivotModes.PIXELS: pivot_offset = pivot_value diff --git a/addons/dialogic/Modules/Character/subsystem_containers.gd b/addons/dialogic/Modules/Character/subsystem_containers.gd index 6fb5b5090..3e1974fe5 100644 --- a/addons/dialogic/Modules/Character/subsystem_containers.gd +++ b/addons/dialogic/Modules/Character/subsystem_containers.gd @@ -146,7 +146,8 @@ func translate_container(container:DialogicNode_PortraitContainer, translation:V if tween: tween.tween_method(DialogicUtil.multitween.bind(container, "position", "base"), container.position, final_translation, time) - tween.finished.connect(save_position_container.bind(container)) + if not tween.finished.is_connected(save_position_container): + tween.finished.connect(save_position_container.bind(container)) else: container.position = final_translation save_position_container(container) @@ -166,7 +167,8 @@ func rotate_container(container:DialogicNode_PortraitContainer, rotation:float, if tween: tween.tween_property(container, 'rotation_degrees', final_rotation, time) - tween.finished.connect(save_position_container.bind(container)) + if not tween.finished.is_connected(save_position_container): + tween.finished.connect(save_position_container.bind(container)) else: container.rotation_degrees = final_rotation save_position_container(container) @@ -192,7 +194,8 @@ func resize_container(container: DialogicNode_PortraitContainer, rect_size: Vari if tween: tween.tween_method(DialogicUtil.multitween.bind(container, "position", "resize_move"), Vector2(), relative_position_change, time) tween.tween_property(container, 'size', final_rect_resize, time) - tween.finished.connect(save_position_container.bind(container)) + if not tween.finished.is_connected(save_position_container): + tween.finished.connect(save_position_container.bind(container)) else: container.position = container.position + relative_position_change container.size = final_rect_resize