fix: fixes inconsistent return type from queue_event_from_esc

This commit is contained in:
Balloonpopper
2022-09-10 11:43:35 +10:00
committed by Duncan Brown
parent 8dbcd52e66
commit ad445cd43b
10 changed files with 49 additions and 6 deletions

View File

@@ -184,12 +184,12 @@ func queue_event_from_esc(script_object: ESCScript, event: String,
var rc = yield(self, "event_finished")
while rc[1] != event:
rc = yield(self, "event_finished")
return rc
return rc[0]
else:
var rc = yield(self, "background_event_finished")
while rc[1] != event and rc[2] != channel:
rc = yield(self, "background_event_finished")
return rc
return rc[0]
return ESCExecution.RC_OK

View File

@@ -130,6 +130,7 @@ func run() -> int:
var rc = command_object.run(prepared_arguments)
if rc is GDScriptFunctionState:
rc = yield(rc, "completed")
escoria.logger.debug(
self,
"[%s] Return code: %d." % [self.name, rc]