-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Lily/HackedBlocks extension (#845)
- Loading branch information
1 parent
7f7cf4d
commit 738b2ee
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Name: Hacked Block Collection | ||
// ID: lmsHackedBlocks | ||
// Description: Various modified vanilla blocks. | ||
// By: LilyMakesThings <https://scratch.mit.edu/users/LilyMakesThings/> | ||
|
||
(function (Scratch) { | ||
"use strict"; | ||
|
||
class HackedBlocks { | ||
getInfo() { | ||
return { | ||
id: "lmsHackedBlocks", | ||
name: "Hacked Block Collection", | ||
blocks: [ | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="event_whentouchingobject"><value name="TOUCHINGOBJECTMENU"><shadow type="event_touchingobjectmenu"/></value></block>', | ||
}, | ||
"---", | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block id="for_each" type="control_for_each"><value name="VALUE"><shadow type="math_whole_number"><field name="NUM">10</field></shadow></value></block>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block id="while" type="control_while"/>', | ||
}, | ||
"---", | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="sensing_keypressed"><value name="KEY_OPTION"><shadow type="text"><field name="TEXT">enter</field></shadow></value></block>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="sensing_touchingobject"><value name="TOUCHINGOBJECTMENU"><shadow type="text"><field name="TEXT">Stage</field></shadow></value></block>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="sensing_touchingcolor"><value name="COLOR"><shadow type="text"><field name="TEXT">#ffffff</field></shadow></value></block>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="sensing_coloristouchingcolor"><value name="COLOR"><shadow type="text"><field name="TEXT">#ffffff</field></shadow></value><value name="COLOR2"><shadow type="text"><field name="TEXT">#ffffff</field></shadow></value></block>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="operator_join"><value name="STRING1"><shadow type="colour_picker"/></value><value name="STRING2"><shadow type="text"><field name="TEXT"></field></shadow></value></block>', | ||
}, | ||
"---", | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="control_get_counter"/>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="control_incr_counter"/>', | ||
}, | ||
{ | ||
blockType: Scratch.BlockType.XML, | ||
xml: '<block type="control_clear_counter"/>', | ||
}, | ||
], | ||
}; | ||
} | ||
} | ||
|
||
Scratch.extensions.register(new HackedBlocks()); | ||
})(Scratch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters