Skip to content

Conversation

yuri-kiss
Copy link

@yuri-kiss yuri-kiss commented Jun 16, 2024

Resolves

Nothing is resolved this is just a new feature.

Proposed Changes

Adds BlockType.INLINE support in full (so compiler support)
This takes the second approach of #187 (comment)
And this PR can be used as a replacement for #187 itself.

Reason for Changes

The need for ugly inline patches and hacky thread stuff.

Test Coverage

No tests but I did try with a extension.

(function(Scratch) {
  class InlineBlockTest {
    getInfo() {
      return {
        id: 'InlineBlockTest',
        name: 'Test: Inline Block',
        blocks: [{
          blockType: Scratch.BlockType.INLINE,
          opcode: 'block',
          text: 'inline',
        }]
      }
    }
    async block(_, util) {
      await (Promise.resolve());
      util.startBranch(1, true); // Loop does not actually work like "loop"
      return 'test';
    }
  }
  Scratch.extensions.register(new InlineBlockTest);
})(Scratch);

return new TypedInput(`p${node.index}`, TYPE_UNKNOWN);

case 'compat':
if (node.blockType === BlockType.INLINE) {

This comment was marked as abuse.

@LilyMakesThings
Copy link

common ashime W

@veggiecan0419
Copy link

veggiecan0419 commented Jun 17, 2024

WT_?
Bruh... 💀 🤣

@yuri-kiss

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants