From 24e654b67b2b907c4a24bcb0b747d4cc10c57d0b Mon Sep 17 00:00:00 2001 From: Cake <65981767+CakeVR@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:49:22 +0100 Subject: [PATCH] Fix instancing new Character Nodes on Simple Highlight Portrait. This portrait is simple and allows for only one image, there is no underlying node hierarchy that may need to change. Therefore, we need to ensure to not recreate a new character node. --- .../Modules/HighlightPortrait/simple_highlight_portrait.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/dialogic/Modules/HighlightPortrait/simple_highlight_portrait.gd b/addons/dialogic/Modules/HighlightPortrait/simple_highlight_portrait.gd index 5ed6649df..53498ab09 100644 --- a/addons/dialogic/Modules/HighlightPortrait/simple_highlight_portrait.gd +++ b/addons/dialogic/Modules/HighlightPortrait/simple_highlight_portrait.gd @@ -19,6 +19,10 @@ func _ready() -> void: self.modulate = unhighlighted_color +func _should_do_portrait_update(_character: DialogicCharacter, _portrait: String) -> bool: + return true + + func _highlight() -> void: create_tween().tween_property(self, 'modulate', Color.WHITE, 0.15) _prev_z_index = DialogicUtil.autoload().Portraits.get_character_info(character).get('z_index', 0)