From a6beb40b3e11ce70ad1c746152fb83924df07963 Mon Sep 17 00:00:00 2001 From: Julian Murgia Date: Sat, 13 Nov 2021 11:15:03 +0100 Subject: [PATCH] Added a check on unknown ESC command at compilation time (#438) --- addons/escoria-core/game/core-scripts/esc/esc_compiler.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd index d5c2e95d..8531ea20 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd @@ -219,8 +219,9 @@ func _compile(lines: Array) -> Array: returned.append(dialog_option) elif command_regex.search(line): var command = ESCCommand.new(line) - escoria.logger.trace("Line is the command %s" % command.name) - returned.append(command) + if command.is_valid(): + escoria.logger.trace("Line is the command %s" % command.name) + returned.append(command) else: escoria.logger.report_errors( "Invalid ESC line detected",