Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
jwklong authored Jan 11, 2025
1 parent 9bb854b commit 74ad9a6
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/extensions/jwArray/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,7 @@ class Extension {
}))
);

//stolen from sharkpool OOps!
const regenReporters = ["jwArray_forEachI", "jwArray_forEachv"];
if (Scratch.gui) Scratch.gui.getBlockly().then(SB => {
const ogCheck = SB.scratchBlocksUtils.isShadowArgumentReporter;
SB.scratchBlocksUtils.isShadowArgumentReporter = function (block) {
const result = ogCheck(block);
if (result) return true;
return block.isShadow() && regenReporters.includes(block.type);
};
});

//patch square shape
if (ScratchBlocks !== undefined) {
ScratchBlocks.BlockSvg.INPUT_SHAPE_SQUARE =
ScratchBlocks.BlockSvg.TOP_LEFT_CORNER_START +
Expand All @@ -162,6 +151,14 @@ class Extension {
' h ' + (-4 * ScratchBlocks.BlockSvg.GRID_UNIT + 2 * ScratchBlocks.BlockSvg.CORNER_RADIUS) +
ScratchBlocks.BlockSvg.BOTTOM_LEFT_CORNER +
' z';

//stolen from sharkpool OOps!
const ogCheck = ScratchBlocks.scratchBlocksUtils.isShadowArgumentReporter;
ScratchBlocks.scratchBlocksUtils.isShadowArgumentReporter = function (block) {
const result = ogCheck(block);
if (result) return true;
return block.isShadow() && regenReporters.includes(block.type);
};
}
}

Expand Down

0 comments on commit 74ad9a6

Please sign in to comment.