diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 6d871eeb..14bb2110 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -2588,7 +2588,8 @@ class Runtime extends EventEmitter { * @param {string} options.procedureCode The ID of the block * @param {function} options.callback The callback, called with (args, BlockUtility). May return a promise. * @param {string[]} [options.arguments] Names of the arguments accepted. Optional if no arguments. - * @param {boolean} [hidden] True to not include this block in the block palette + * @param {boolean} [options.hidden] True to not include this block in the block palette + * @param {1|2} [options.return] 1 for round reporter, 2 for boolean reported, leave empty for statement. */ addAddonBlock (options) { const procedureCode = options.procedureCode; @@ -2633,6 +2634,7 @@ class Runtime extends EventEmitter { ` argumentnames="${xmlEscape(JSON.stringify(names))}"` + ` argumentids="${xmlEscape(JSON.stringify(ids))}"` + ` argumentdefaults="${xmlEscape(JSON.stringify(defaults))}"` + + `${options.return ? ` return="${xmlEscape(options.return.toString())}"` : ''}` + '>' }); }