diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_sound_state.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_sound_state.gd index b9675306..50886815 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_sound_state.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_sound_state.gd @@ -32,7 +32,7 @@ func validate(arguments: Array): ) return false if not arguments[1] in ["default", "off"] \ - or not ResourceLoader.exists(arguments[1]): + and not ResourceLoader.exists(arguments[1]): escoria.logger.report_errors( "SetSoundStateCommand.validate: invalid sound", [ 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 c063a8a3..adea2b14 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 @@ -113,7 +113,8 @@ func run() -> int: var prepared_arguments = argument_descriptor.prepare_arguments( self.parameters ) - if argument_descriptor.validate(self.name, prepared_arguments): + if argument_descriptor.validate(self.name, prepared_arguments) and\ + command_object.validate(prepared_arguments): escoria.logger.debug("Running command %s with parameters %s" % [ self.name, prepared_arguments