Added a check on unknown ESC command at compilation time (#438)

This commit is contained in:
Julian Murgia
2021-11-13 11:15:03 +01:00
committed by GitHub
parent e638919377
commit a6beb40b3e

View File

@@ -219,8 +219,9 @@ func _compile(lines: Array) -> Array:
returned.append(dialog_option) returned.append(dialog_option)
elif command_regex.search(line): elif command_regex.search(line):
var command = ESCCommand.new(line) var command = ESCCommand.new(line)
escoria.logger.trace("Line is the command %s" % command.name) if command.is_valid():
returned.append(command) escoria.logger.trace("Line is the command %s" % command.name)
returned.append(command)
else: else:
escoria.logger.report_errors( escoria.logger.report_errors(
"Invalid ESC line detected", "Invalid ESC line detected",