mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-01 00:32:05 -04:00
Merge pull request #1488 from towerofnix/misc-noop-blocks
Add micellaneous no-op obsolete blocks
This commit is contained in:
commit
a75c6b44b9
3 changed files with 88 additions and 0 deletions
|
@ -146,6 +146,23 @@ Blockly.Blocks['looks_hide'] = {
|
|||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['looks_hideallsprites'] = {
|
||||
/**
|
||||
* Hide-all-sprites block. Does not actually do anything. This is an
|
||||
* obsolete block that is implemented for compatibility with Scratch 2.0
|
||||
* projects.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
this.jsonInit(
|
||||
{
|
||||
"message0": Blockly.Msg.LOOKS_HIDEALLSPRITES,
|
||||
"category": Blockly.Categories.looks,
|
||||
"extensions": ["colours_looks", "shape_statement"]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['looks_changeeffectby'] = {
|
||||
/**
|
||||
* Block to change graphic effect.
|
||||
|
@ -281,6 +298,57 @@ Blockly.Blocks['looks_size'] = {
|
|||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['looks_changestretchby'] = {
|
||||
/**
|
||||
* Block to change stretch. Does not actually do anything. This is an
|
||||
* obsolete block that is implemented for compatibility with Scratch 1.4
|
||||
* projects as well as 2.0 projects that still have the block.
|
||||
* The "stretch" blocks were introduced in very early versions of Scratch,
|
||||
* but their functionality was removed shortly later. They still appeared
|
||||
* correctly up until (and including) Scratch 1.4 - as "change stretch by"
|
||||
* and "set stretch to" - but were removed altogether in Scratch 2.0, and
|
||||
* displayed as red "undefined" blocks. Some Scratch projects still contain
|
||||
* these blocks, however, and they don't open in 3.0 unless the blocks
|
||||
* actually exist (though they still don't funcitonally do anything).
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
this.jsonInit({
|
||||
"message0": Blockly.Msg.LOOKS_CHANGESTRETCHBY,
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "CHANGE"
|
||||
}
|
||||
],
|
||||
"category": Blockly.Categories.looks,
|
||||
"extensions": ["colours_looks", "shape_statement"]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['looks_setstretchto'] = {
|
||||
/**
|
||||
* Block to set stretch. Does not actually do anything. This is an obsolete
|
||||
* block that is implemented for compatibility with Scratch 1.4 projects
|
||||
* (see looks_changestretchby).
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
this.jsonInit({
|
||||
"message0": Blockly.Msg.LOOKS_SETSTRETCHTO,
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "STRETCH"
|
||||
}
|
||||
],
|
||||
"category": Blockly.Categories.looks,
|
||||
"extensions": ["colours_looks", "shape_statement"]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['looks_costume'] = {
|
||||
/**
|
||||
* Costumes drop-down menu.
|
||||
|
|
|
@ -523,3 +523,19 @@ Blockly.Blocks['sensing_username'] = {
|
|||
});
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['sensing_userid'] = {
|
||||
/**
|
||||
* Block to report user's ID. Does not actually do anything. This is an
|
||||
* obsolete block that is implemented for compatibility with Scratch 2.0
|
||||
* projects.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
this.jsonInit({
|
||||
"message0": Blockly.Msg.SENSING_USERID,
|
||||
"category": Blockly.Categories.sensing,
|
||||
"extensions": ["colours_sensing", "output_number"]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -90,6 +90,7 @@ Blockly.Msg.LOOKS_THINKFORSECS = "think %1 for %2 seconds";
|
|||
Blockly.Msg.LOOKS_THINK = "think %1";
|
||||
Blockly.Msg.LOOKS_SHOW = "show";
|
||||
Blockly.Msg.LOOKS_HIDE = "hide";
|
||||
Blockly.Msg.LOOKS_HIDEALLSPRITES = "hide all sprites";
|
||||
Blockly.Msg.LOOKS_EFFECT_COLOR = "color";
|
||||
Blockly.Msg.LOOKS_EFFECT_FISHEYE = "fisheye";
|
||||
Blockly.Msg.LOOKS_EFFECT_WHIRL = "whirl";
|
||||
|
@ -103,6 +104,8 @@ Blockly.Msg.LOOKS_CLEARGRAPHICEFFECTS = "clear graphic effects";
|
|||
Blockly.Msg.LOOKS_CHANGESIZEBY = "change size by %1";
|
||||
Blockly.Msg.LOOKS_SETSIZETO = "set size to %1 %";
|
||||
Blockly.Msg.LOOKS_SIZE = "size";
|
||||
Blockly.Msg.LOOKS_CHANGESTRETCHBY = "change stretch by %1";
|
||||
Blockly.Msg.LOOKS_SETSTRETCHTO = "set stretch to %1 %";
|
||||
Blockly.Msg.LOOKS_SWITCHCOSTUMETO = "switch costume to %1";
|
||||
Blockly.Msg.LOOKS_NEXTCOSTUME = "next costume";
|
||||
Blockly.Msg.LOOKS_SWITCHBACKDROPTO = "switch backdrop to %1";
|
||||
|
@ -225,6 +228,7 @@ Blockly.Msg.SENSING_CURRENT_MINUTE = "minute";
|
|||
Blockly.Msg.SENSING_CURRENT_SECOND = "second";
|
||||
Blockly.Msg.SENSING_DAYSSINCE2000 = "days since 2000";
|
||||
Blockly.Msg.SENSING_USERNAME = "username";
|
||||
Blockly.Msg.SENSING_USERID = "user id";
|
||||
|
||||
// Sound blocks
|
||||
Blockly.Msg.SOUND_PLAY = "start sound %1";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue