fix: fixes inconsistent return type from queue_event_from_esc

This commit is contained in:
Balloonpopper authored and Duncan Brown committed 2022-09-12 16:19:24 -04:00
1 parent 8dbcd52e66
commit ad445cd43b
10 files changed
+49 -6

No files matched your search

@@ -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
@@ -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]