fix: disallows dialog blocks that aren't properly indented; however, this also changes how dialog options are parsed and will require substantial testing.
This commit is contained in:
committed by
Julian Murgia
parent
8cd61cdd2b
commit
0ff35136ba
@@ -248,8 +248,18 @@ func _compile(lines: Array, path: String = "") -> Array:
|
||||
if next_line_indent > indent:
|
||||
dialog_option_lines.append(next_line)
|
||||
else:
|
||||
lines.push_front(next_line)
|
||||
break
|
||||
if _dialog_end_regex.search(next_line) or \
|
||||
_dialog_option_regex.search(next_line):
|
||||
lines.push_front(next_line)
|
||||
break
|
||||
|
||||
# There MUST be AT LEAST ONE statement/line for a dialog
|
||||
# option's block that's properly indented
|
||||
escoria.logger.error(
|
||||
self,
|
||||
"Dialog option '%s' has at least one line in its block that is not indented sufficiently." \
|
||||
% line
|
||||
)
|
||||
if dialog_option_lines.size() > 0:
|
||||
escoria.logger.trace(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user