From 99001d2fd8405eb048316934e1df1e2eb9d8a32b Mon Sep 17 00:00:00 2001 From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:21:09 +0100 Subject: [PATCH] Update data.js --- blocks_vertical/data.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/blocks_vertical/data.js b/blocks_vertical/data.js index a610ae8788..e8a2a5c0ed 100644 --- a/blocks_vertical/data.js +++ b/blocks_vertical/data.js @@ -403,6 +403,32 @@ Blockly.Blocks['data_replaceitemoflist'] = { } }; + +Blockly.Blocks['data_setlist'] = { + /** + * Block to insert item to list. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.DATA_SETLIST, + "args0": [ + { + "type": "field_variable", + "name": "LIST", + "variableTypes": [Blockly.LIST_VARIABLE_TYPE] + }, + { + "type": "input_value", + "name": "ARRAY" + } + ], + "category": Blockly.Categories.dataLists, + "extensions": ["colours_data_lists", "shape_statement"] + }); + } +}; + Blockly.Blocks['data_itemoflist'] = { /** * Block for reporting item of list.