From 064973f0a985e04fec3be2111cd0148fa96f64e8 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Sat, 3 Dec 2022 14:03:08 -0500 Subject: [PATCH] fix: allows for colons to be placed anywhere in the dialogue being spoken. --- .../escoria-core/game/core-scripts/esc/types/esc_command.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd index 50c9cf41..9311fc98 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd @@ -46,7 +46,10 @@ func _init(command_string): parameters.append( parameter ) - elif ':"' in parameter and (parameter.ends_with(':"') or not parameter.ends_with('"')): + elif not quote_open \ + and parameter.count(":") == 1 \ + and ':"' in parameter \ + and (parameter.ends_with(':"') or not parameter.ends_with('"')): # The second clause in this helps to handle dialogue that starts with a space # and also allowing single-word dialogue to be handled in a separate elif. quote_open = true