From 61a15266b5b36859a3f7fc6a8abfb24eeefbe7bd Mon Sep 17 00:00:00 2001 From: Jowan-Spooner Date: Wed, 13 Nov 2024 19:40:23 +0100 Subject: [PATCH] Styles: Fix persistent info getting lost Now persistent info is always merged with the previously stored info. This means switching to a non-textbubble style doesn't clear all registers. --- addons/dialogic/Resources/dialogic_layout_base.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/dialogic/Resources/dialogic_layout_base.gd b/addons/dialogic/Resources/dialogic_layout_base.gd index 16a2ee4a2..b773e0272 100644 --- a/addons/dialogic/Resources/dialogic_layout_base.gd +++ b/addons/dialogic/Resources/dialogic_layout_base.gd @@ -63,7 +63,9 @@ func _enter_tree() -> void: func _exit_tree() -> void: - Engine.set_meta("dialogic_persistent_style_info", _get_persistent_info()) + var info: Dictionary = Engine.get_meta("dialogic_persistent_style_info", {}) + info.merge(_get_persistent_info(), true) + Engine.set_meta("dialogic_persistent_style_info", info) ## To be overwritten. Return any info that a later used style might want to know.