Implement 'hide all sprites' and 'user id' blocks

This commit is contained in:
Florrie 2018-04-30 21:03:35 -03:00
parent 23e72525bf
commit 231402fc53
3 changed files with 17 additions and 1 deletions

View file

@ -244,6 +244,7 @@ class Scratch3LooksBlocks {
looks_thinkforsecs: this.thinkforsecs,
looks_show: this.show,
looks_hide: this.hide,
looks_hideallsprites: this.doNothing,
looks_switchcostumeto: this.switchCostume,
looks_switchbackdropto: this.switchBackdrop,
looks_switchbackdroptoandwait: this.switchBackdropAndWait,
@ -479,6 +480,8 @@ class Scratch3LooksBlocks {
// Else return name
return util.target.getCostumes()[util.target.currentCostume].name;
}
doNothing() {}
}
module.exports = Scratch3LooksBlocks;

View file

@ -66,7 +66,8 @@ class Scratch3SensingBlocks {
sensing_dayssince2000: this.daysSince2000,
sensing_loudness: this.getLoudness,
sensing_askandwait: this.askAndWait,
sensing_answer: this.getAnswer
sensing_answer: this.getAnswer,
sensing_userid: this.doNothing
};
}
@ -293,6 +294,8 @@ class Scratch3SensingBlocks {
// Otherwise, 0
return 0;
}
doNothing() {}
}
module.exports = Scratch3SensingBlocks;

View file

@ -266,6 +266,11 @@ const specMap = {
argMap: [
]
},
'hideAll': {
opcode: 'looks_hideallsprites',
argMap: [
]
},
'lookLike:': {
opcode: 'looks_switchcostumeto',
argMap: [
@ -1043,6 +1048,11 @@ const specMap = {
argMap: [
]
},
'getUserId': {
opcode: 'sensing_userid',
argMap: [
]
},
'+': {
opcode: 'operator_add',
argMap: [