Skip to content

Commit a5cd267

Browse files
authored
Move these spooky hidden blocks (#39)
1 parent 7b768f6 commit a5cd267

5 files changed

Lines changed: 108 additions & 112 deletions

File tree

blocks_vertical/control.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,23 +1354,3 @@ Blockly.Blocks['control_continueLoop'] = {
13541354
});
13551355
}
13561356
};
1357-
1358-
Blockly.Blocks['control_javascript_command'] = {
1359-
/**
1360-
* pm: Block to run javascript code.
1361-
* @this Blockly.Block
1362-
*/
1363-
init: function () {
1364-
this.jsonInit({
1365-
"message0": "javascript %1",
1366-
"args0": [
1367-
{
1368-
"type": "input_value",
1369-
"name": "JS"
1370-
}
1371-
],
1372-
"category": Blockly.Categories.control,
1373-
"extensions": ["colours_control", "shape_statement"]
1374-
});
1375-
}
1376-
};

blocks_vertical/event.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -470,20 +470,3 @@ Blockly.Blocks["event_whenanything"] = {
470470
});
471471
}
472472
};
473-
474-
Blockly.Blocks["event_whenjavascript"] = {
475-
init: function () {
476-
this.jsonInit({
477-
"inputsInline": true,
478-
"message0": "when javascript %1 === true",
479-
"args0": [
480-
{
481-
"type": "input_value",
482-
"name": "JS"
483-
}
484-
],
485-
"category": Blockly.Categories.event,
486-
"extensions": ["colours_event", "shape_hat"]
487-
});
488-
}
489-
};

blocks_vertical/live_tests.js

Lines changed: 106 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -256,46 +256,6 @@ Blockly.Blocks['operator_expandableCompare'] = {
256256
}
257257
};
258258

259-
Blockly.Blocks['looks_setVertTransform'] = {
260-
/**
261-
* Block to report properties of sprites.
262-
* @this Blockly.Block
263-
*/
264-
init: function() {
265-
this.jsonInit({
266-
"message0": 'skew sprite vertically %1 %',
267-
"args0": [
268-
{
269-
"type": "input_value",
270-
"name": "PERCENT"
271-
}
272-
],
273-
"category": Blockly.Categories.looks,
274-
"extensions": ["colours_looks", "shape_statement"]
275-
});
276-
}
277-
};
278-
279-
Blockly.Blocks['looks_setHorizTransform'] = {
280-
/**
281-
* Block to report properties of sprites.
282-
* @this Blockly.Block
283-
*/
284-
init: function() {
285-
this.jsonInit({
286-
"message0": 'skew sprite horizontally %1 %',
287-
"args0": [
288-
{
289-
"type": "input_value",
290-
"name": "PERCENT"
291-
}
292-
],
293-
"category": Blockly.Categories.looks,
294-
"extensions": ["colours_looks", "shape_statement"]
295-
});
296-
}
297-
};
298-
299259
Blockly.Blocks['field_textdropdown_test'] = {
300260
init: function() {
301261
this.jsonInit({
@@ -531,3 +491,109 @@ Blockly.Blocks['control_dualblock'] = {
531491
});
532492
}
533493
};
494+
495+
/* The following are Deprecated, either scrapped or redone */
496+
/**
497+
* Hidden since this is dangerous to keep in the main
498+
* toolbox. Its also now in the javascript extension
499+
* which is built to be safer and more focused on js
500+
*/
501+
Blockly.Blocks['control_javascript_command'] = {
502+
init: function () {
503+
this.jsonInit({
504+
"message0": "javascript %1",
505+
"args0": [
506+
{
507+
"type": "input_value",
508+
"name": "JS"
509+
}
510+
],
511+
"category": Blockly.Categories.control,
512+
"extensions": ["colours_control", "shape_statement"]
513+
});
514+
}
515+
};
516+
Blockly.Blocks["operator_javascript_output"] = {
517+
init: function () {
518+
this.jsonInit({
519+
"inputsInline": true,
520+
"message0": "javascript %1",
521+
"args0": [
522+
{
523+
"type": "input_value",
524+
"name": "JS"
525+
}
526+
],
527+
"category": Blockly.Categories.operators,
528+
"extensions": ["colours_operators", "output_string"]
529+
});
530+
}
531+
};
532+
Blockly.Blocks["operator_javascript_boolean"] = {
533+
init: function () {
534+
this.jsonInit({
535+
"inputsInline": true,
536+
"message0": "javascript %1",
537+
"args0": [
538+
{
539+
"type": "input_value",
540+
"name": "JS"
541+
}
542+
],
543+
"category": Blockly.Categories.operators,
544+
"extensions": ["colours_operators", "output_boolean"]
545+
});
546+
}
547+
};
548+
Blockly.Blocks["event_whenjavascript"] = {
549+
init: function () {
550+
this.jsonInit({
551+
"inputsInline": true,
552+
"message0": "when javascript %1 === true",
553+
"args0": [
554+
{
555+
"type": "input_value",
556+
"name": "JS"
557+
}
558+
],
559+
"category": Blockly.Categories.event,
560+
"extensions": ["colours_event", "shape_hat"]
561+
});
562+
}
563+
};
564+
565+
/**
566+
* Renamed to shear, which is now an effect in looks
567+
*/
568+
Blockly.Blocks['looks_setVertTransform'] = {
569+
init: function() {
570+
this.jsonInit({
571+
"message0": 'skew sprite vertically %1 %',
572+
"args0": [
573+
{
574+
"type": "input_value",
575+
"name": "PERCENT"
576+
}
577+
],
578+
"category": Blockly.Categories.looks,
579+
"extensions": ["colours_looks", "shape_statement"]
580+
});
581+
}
582+
};
583+
Blockly.Blocks['looks_setHorizTransform'] = {
584+
init: function() {
585+
this.jsonInit({
586+
"message0": 'skew sprite horizontally %1 %',
587+
"args0": [
588+
{
589+
"type": "input_value",
590+
"name": "PERCENT"
591+
}
592+
],
593+
"category": Blockly.Categories.looks,
594+
"extensions": ["colours_looks", "shape_statement"]
595+
});
596+
}
597+
};
598+
599+
/* End of Deprecation marker */

blocks_vertical/operators.js

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,40 +1455,6 @@ Blockly.Blocks["operator_toUpperLowerCase"] = {
14551455
}
14561456
};
14571457

1458-
Blockly.Blocks["operator_javascript_output"] = {
1459-
init: function () {
1460-
this.jsonInit({
1461-
"inputsInline": true,
1462-
"message0": "javascript %1",
1463-
"args0": [
1464-
{
1465-
"type": "input_value",
1466-
"name": "JS"
1467-
}
1468-
],
1469-
"category": Blockly.Categories.operators,
1470-
"extensions": ["colours_operators", "output_string"]
1471-
});
1472-
}
1473-
};
1474-
1475-
Blockly.Blocks["operator_javascript_boolean"] = {
1476-
init: function () {
1477-
this.jsonInit({
1478-
"inputsInline": true,
1479-
"message0": "javascript %1",
1480-
"args0": [
1481-
{
1482-
"type": "input_value",
1483-
"name": "JS"
1484-
}
1485-
],
1486-
"category": Blockly.Categories.operators,
1487-
"extensions": ["colours_operators", "output_boolean"]
1488-
});
1489-
}
1490-
};
1491-
14921458
Blockly.Blocks['operator_checkboxBoolean'] = {
14931459
init: function() {
14941460
this.jsonInit({
@@ -1503,4 +1469,4 @@ Blockly.Blocks['operator_checkboxBoolean'] = {
15031469
"extensions": ["colours_operators", "output_boolean"]
15041470
});
15051471
}
1506-
};
1472+
};

msg/messages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ Blockly.Msg.CATEGORY_CONTROL = 'Control';
309309
Blockly.Msg.CATEGORY_SENSING = 'Sensing';
310310
Blockly.Msg.CATEGORY_OPERATORS = 'Operators';
311311
Blockly.Msg.CATEGORY_VARIABLES = 'Variables';
312+
Blockly.Msg.CATEGORY_LISTS = 'Lists';
312313
Blockly.Msg.CATEGORY_MYBLOCKS = 'My Blocks';
313314

314315
// Context menus

0 commit comments

Comments
 (0)