Skip to content

Commit b67bb77

Browse files
committed
Fix for #1710
Fixed history text parsing
1 parent 8432ae2 commit b67bb77

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

addons/dialogic/Nodes/DialogNode.gd

+14-3
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ func event_handler(event: Dictionary):
660660

661661
current_event = event
662662

663-
if record_history:
663+
# Text and questions text isn't finalized at this point
664+
if record_history and event['event_id'] != 'dialogic_001' and event['event_id'] != 'dialogic_010':
664665
HistoryTimeline.add_history_row_event(current_event)
665666

666667
match event['event_id']:
@@ -682,7 +683,12 @@ func event_handler(event: Dictionary):
682683

683684
#voice
684685
handle_voice(event)
685-
update_text(event['text'])
686+
var finalText = update_text(event['text'])
687+
688+
# This handles specific text elements
689+
if record_history:
690+
current_event['text'] = finalText
691+
HistoryTimeline.add_history_row_event(current_event)
686692
# Character event
687693
'dialogic_002':
688694
## PLEASE UPDATE THIS! BUT HOW?
@@ -801,7 +807,12 @@ func event_handler(event: Dictionary):
801807
update_name(character_data)
802808
#voice
803809
handle_voice(event)
804-
update_text(event['question'])
810+
var finalText = update_text(event['question'])
811+
812+
# This handles specific text elements
813+
if record_history:
814+
current_event['question'] = finalText
815+
HistoryTimeline.add_history_row_event(current_event)
805816
# Choice event
806817
'dialogic_011':
807818
emit_signal("event_start", "choice", event)

0 commit comments

Comments
 (0)