Playground update; update SB2 spec map for list, _ of _ blocks (#184)

* Playground update

* Update SB2 spec map for list, _ of _ blocks
This commit is contained in:
Tim Mickel 2016-09-15 17:10:32 -04:00 committed by GitHub
parent 8987330853
commit 6b3f0d3d8a
2 changed files with 741 additions and 677 deletions

View file

@ -401,24 +401,74 @@
</value> </value>
</block> </block>
</category> </category>
<category name="Data" colour="#FF8C1A" custom="VARIABLE"></category> <category name="Data" colour="#FF8C1A" custom="VARIABLE">
</category>
<category name="Lists" colour="#FF8C1A">
<block type="data_list"></block>
<block type="data_addtolist">
<value name="ITEM">
<shadow type="text">
<field name="TEXT">thing</field>
</shadow>
</value>
</block>
<block type="data_deleteoflist">
<value name="INDEX">
<shadow type="math_integer">
<field name="NUM">1</field>
</shadow>
</value>
</block>
<block type="data_insertatlist">
<value name="INDEX">
<shadow type="math_integer">
<field name="NUM">1</field>
</shadow>
</value>
<value name="ITEM">
<shadow type="text">
<field name="TEXT">thing</field>
</shadow>
</value>
</block>
<block type="data_replaceitemoflist">
<value name="INDEX">
<shadow type="math_integer">
<field name="NUM">1</field>
</shadow>
</value>
<value name="ITEM">
<shadow type="text">
<field name="TEXT">thing</field>
</shadow>
</value>
</block>
<block type="data_itemoflist">
<value name="INDEX">
<shadow type="math_integer">
<field name="NUM">1</field>
</shadow>
</value>
</block>
<block type="data_lengthoflist"></block>
<block type="data_listcontainsitem">
<value name="ITEM">
<shadow type="text">
<field name="TEXT">thing</field>
</shadow>
</value>
</block>
<block type="data_showlist"></block>
<block type="data_hidelist"></block>
</category>
<category name="Events" colour="#FFD500"> <category name="Events" colour="#FFD500">
<block type="event_whenflagclicked"></block> <block type="event_whenflagclicked"></block>
<block type="event_whenkeypressed"> <block type="event_whenkeypressed">
<value name="KEY_OPTION">
<shadow type="event_keyoptions"></shadow>
</value>
</block> </block>
<block type="event_whenthisspriteclicked"></block> <block type="event_whenthisspriteclicked"></block>
<block type="event_whenbackdropswitchesto"> <block type="event_whenbackdropswitchesto">
<value name="BACKDROP">
<shadow type="event_backdrops"></shadow>
</value>
</block> </block>
<block type="event_whengreaterthan"> <block type="event_whengreaterthan">
<value name="WHENGREATERTHANMENU">
<shadow type="event_whengreaterthanmenu"></shadow>
</value>
<value name="VALUE"> <value name="VALUE">
<shadow type="math_number"> <shadow type="math_number">
<field name="NUM">10</field> <field name="NUM">10</field>
@ -426,9 +476,6 @@
</value> </value>
</block> </block>
<block type="event_whenbroadcastreceived"> <block type="event_whenbroadcastreceived">
<value name="BROADCAST_OPTION">
<shadow type="event_broadcast_menu"></shadow>
</value>
</block> </block>
<block type="event_broadcast"> <block type="event_broadcast">
<value name="BROADCAST_OPTION"> <value name="BROADCAST_OPTION">
@ -537,6 +584,14 @@
</block> </block>
<block type="sensing_timer"></block> <block type="sensing_timer"></block>
<block type="sensing_resettimer"></block> <block type="sensing_resettimer"></block>
<block type="sensing_of">
<value name="PROPERTY">
<shadow type="sensing_of_property_menu"></shadow>
</value>
<value name="OBJECT">
<shadow type="sensing_of_object_menu"></shadow>
</value>
</block>
<block type="sensing_current"> <block type="sensing_current">
<value name="CURRENTMENU"> <value name="CURRENTMENU">
<shadow type="sensing_currentmenu"></shadow> <shadow type="sensing_currentmenu"></shadow>

View file

@ -905,12 +905,12 @@ var specMap = {
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'sensing_ofattributemenu', 'inputOp':'sensing_of_property_menu',
'inputName':'ATTRIBUTE' 'inputName':'PROPERTY'
}, },
{ {
'type':'input', 'type':'input',
'inputOp':'sensing_ofobjectmenu', 'inputOp':'sensing_of_object_menu',
'inputName':'OBJECT' 'inputName':'OBJECT'
} }
] ]
@ -1230,13 +1230,22 @@ var specMap = {
} }
] ]
}, },
'contentsOfList:':{
'opcode':'data_list',
'argMap':[
{
'type':'field',
'fieldName':'LIST'
}
]
},
'append:toList:':{ 'append:toList:':{
'opcode':'data_listadd', 'opcode':'data_addtolist',
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'text',
'inputName':'VALUE' 'inputName':'ITEM'
}, },
{ {
'type':'field', 'type':'field',
@ -1245,12 +1254,12 @@ var specMap = {
] ]
}, },
'deleteLine:ofList:':{ 'deleteLine:ofList:':{
'opcode':'data_listdelete', 'opcode':'data_deleteoflist',
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'math_integer',
'inputName':'LINE' 'inputName':'INDEX'
}, },
{ {
'type':'field', 'type':'field',
@ -1259,17 +1268,17 @@ var specMap = {
] ]
}, },
'insert:at:ofList:':{ 'insert:at:ofList:':{
'opcode':'data_listinsert', 'opcode':'data_insertatlist',
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'text',
'inputName':'VALUE' 'inputName':'ITEM'
}, },
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'math_integer',
'inputName':'LINE' 'inputName':'INDEX'
}, },
{ {
'type':'field', 'type':'field',
@ -1278,12 +1287,12 @@ var specMap = {
] ]
}, },
'setLine:ofList:to:':{ 'setLine:ofList:to:':{
'opcode':'data_listreplace', 'opcode':'data_replaceitemoflist',
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'math_integer',
'inputName':'LINE' 'inputName':'INDEX'
}, },
{ {
'type':'field', 'type':'field',
@ -1292,17 +1301,17 @@ var specMap = {
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'text',
'inputName':'VALUE' 'inputName':'ITEM'
} }
] ]
}, },
'getLine:ofList:':{ 'getLine:ofList:':{
'opcode':'data_listitem', 'opcode':'data_itemoflist',
'argMap':[ 'argMap':[
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'math_integer',
'inputName':'LINE' 'inputName':'INDEX'
}, },
{ {
'type':'field', 'type':'field',
@ -1311,7 +1320,7 @@ var specMap = {
] ]
}, },
'lineCountOfList:':{ 'lineCountOfList:':{
'opcode':'data_listlength', 'opcode':'data_lengthoflist',
'argMap':[ 'argMap':[
{ {
'type':'field', 'type':'field',
@ -1320,7 +1329,7 @@ var specMap = {
] ]
}, },
'list:contains:':{ 'list:contains:':{
'opcode':'data_listcontains', 'opcode':'data_listcontainsitem',
'argMap':[ 'argMap':[
{ {
'type':'field', 'type':'field',
@ -1329,7 +1338,7 @@ var specMap = {
{ {
'type':'input', 'type':'input',
'inputOp':'text', 'inputOp':'text',
'inputName':'VALUE' 'inputName':'ITEM'
} }
] ]
}, },