fix: allows for colons to be placed anywhere in the dialogue being spoken.

This commit is contained in:
Duncan Brown authored and Julian Murgia committed 2022-12-04 17:45:30 +01:00
1 parent f64b7d5186
commit 064973f0a9
1 file changed
+4 -1
@@ -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