From d2906004ab2adb47ebbc85da479b7df8250937f5 Mon Sep 17 00:00:00 2001 From: Surv <135030944+SurvExe1Pc@users.noreply.github.com> Date: Sat, 12 Aug 2023 11:32:44 -0400 Subject: [PATCH] add blocks --- extensions/Lily/CommentBlocks.js | 40 +++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/extensions/Lily/CommentBlocks.js b/extensions/Lily/CommentBlocks.js index bd831f0b4f..9876c65e00 100644 --- a/extensions/Lily/CommentBlocks.js +++ b/extensions/Lily/CommentBlocks.js @@ -61,7 +61,37 @@ type: Scratch.ArgumentType.BOOLEAN } } - } + }, + { + opcode: 'commentMatrix', + blockType: Scratch.BlockType.REPORTER, + text: '[INPUT] // [COMMENT]', + arguments: { + COMMENT: { + type: Scratch.ArgumentType.STRING, + defaultValue: 'comment' + }, + INPUT: { + type: Scratch.ArgumentType.MATRIX, + defaultValue: '0101010101100010101000100' // a <3 lool + } + } + }, + { + opcode: 'commentColor', + blockType: Scratch.BlockType.REPORTER, + text: '[INPUT] // [COMMENT]', + arguments: { + COMMENT: { + type: Scratch.ArgumentType.STRING, + defaultValue: 'comment' + }, + INPUT: { + type: Scratch.ArgumentType.COLOR, + defaultValue: '#ff0000' // red + } + } + } ] }; } @@ -81,6 +111,14 @@ commentBoolean (args) { return args.INPUT || false; } + + commentMatrix (args) { + return args.INPUT; + } + + commentColor (args) { + return args.INPUT; + } } Scratch.extensions.register(new CommentBlocks()); })(Scratch);