Merge pull request #1102 from towerofnix/misc-noop-vm

"Implement" miscellaneous no-op obsolete blocks
This commit is contained in:
kchadha 2018-05-01 15:42:53 -04:00 committed by GitHub
commit 3161831890
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 1 deletions

View file

@ -235,6 +235,7 @@ class Scratch3LooksBlocks {
looks_thinkforsecs: this.thinkforsecs, looks_thinkforsecs: this.thinkforsecs,
looks_show: this.show, looks_show: this.show,
looks_hide: this.hide, looks_hide: this.hide,
looks_hideallsprites: () => {}, // legacy no-op block
looks_switchcostumeto: this.switchCostume, looks_switchcostumeto: this.switchCostume,
looks_switchbackdropto: this.switchBackdrop, looks_switchbackdropto: this.switchBackdrop,
looks_switchbackdroptoandwait: this.switchBackdropAndWait, looks_switchbackdroptoandwait: this.switchBackdropAndWait,
@ -245,6 +246,8 @@ class Scratch3LooksBlocks {
looks_cleargraphiceffects: this.clearEffects, looks_cleargraphiceffects: this.clearEffects,
looks_changesizeby: this.changeSize, looks_changesizeby: this.changeSize,
looks_setsizeto: this.setSize, looks_setsizeto: this.setSize,
looks_changestretchby: () => {}, // legacy no-op blocks
looks_setstretchto: () => {},
looks_gotofrontback: this.goToFrontBack, looks_gotofrontback: this.goToFrontBack,
looks_goforwardbackwardlayers: this.goForwardBackwardLayers, looks_goforwardbackwardlayers: this.goForwardBackwardLayers,
looks_size: this.getSize, looks_size: this.getSize,

View file

@ -67,7 +67,8 @@ class Scratch3SensingBlocks {
sensing_loudness: this.getLoudness, sensing_loudness: this.getLoudness,
sensing_loud: this.isLoud, sensing_loud: this.isLoud,
sensing_askandwait: this.askAndWait, sensing_askandwait: this.askAndWait,
sensing_answer: this.getAnswer sensing_answer: this.getAnswer,
sensing_userid: () => {} // legacy no-op block
}; };
} }

View file

@ -266,6 +266,11 @@ const specMap = {
argMap: [ argMap: [
] ]
}, },
'hideAll': {
opcode: 'looks_hideallsprites',
argMap: [
]
},
'lookLike:': { 'lookLike:': {
opcode: 'looks_switchcostumeto', opcode: 'looks_switchcostumeto',
argMap: [ argMap: [
@ -344,6 +349,26 @@ const specMap = {
} }
] ]
}, },
'changeStretchBy:': {
opcode: 'looks_changestretchby',
argMap: [
{
type: 'input',
inputOp: 'math_number',
inputName: 'CHANGE'
}
]
},
'setStretchTo:': {
opcode: 'looks_setstretchto',
argMap: [
{
type: 'input',
inputOp: 'math_number',
inputName: 'STRETCH'
}
]
},
'comeToFront': { 'comeToFront': {
opcode: 'looks_gotofrontback', opcode: 'looks_gotofrontback',
argMap: [ argMap: [
@ -1048,6 +1073,11 @@ const specMap = {
argMap: [ argMap: [
] ]
}, },
'getUserId': {
opcode: 'sensing_userid',
argMap: [
]
},
'+': { '+': {
opcode: 'operator_add', opcode: 'operator_add',
argMap: [ argMap: [