From bb6b22f9c111f2b4b450902a90f0cf1038d17b14 Mon Sep 17 00:00:00 2001 From: Jowan-Spooner <42868150+Jowan-Spooner@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:44:44 +0100 Subject: [PATCH] Fix empty-choice-indent bug (#1991) Reported by a user on discord, having an empty choice before an indentation change would incorreclty calculate the amount of end branches needed. --- addons/dialogic/Resources/timeline.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/dialogic/Resources/timeline.gd b/addons/dialogic/Resources/timeline.gd index e62051257..4108502ab 100644 --- a/addons/dialogic/Resources/timeline.gd +++ b/addons/dialogic/Resources/timeline.gd @@ -150,7 +150,7 @@ func process() -> void: _events.append(end_event.duplicate()) # Add an end event if the indent is the same but the previous was an opener # (so for example choice that is empty) - elif prev_was_opener and len(indent) == len(prev_indent): + if prev_was_opener and len(indent) <= len(prev_indent): _events.append(end_event.duplicate()) prev_indent = indent