Implement costume name block
This commit is contained in:
1 parent
173fb6127c
commit
404834018b
2 files changed
+11
No files matched your search
@@ -252,6 +252,7 @@ class Scratch3LooksBlocks {
|
||||
looks_goforwardbackwardlayers: this.goForwardBackwardLayers,
|
||||
looks_size: this.getSize,
|
||||
looks_costumenumbername: this.getCostumeNumberName,
|
||||
looks_costumename: this.getCostumeName,
|
||||
looks_backdropnumbername: this.getBackdropNumberName
|
||||
};
|
||||
}
|
||||
@@ -488,6 +489,11 @@ class Scratch3LooksBlocks {
|
||||
// Else return name
|
||||
return util.target.getCostumes()[util.target.currentCostume].name;
|
||||
}
|
||||
|
||||
getCostumeName (args, util) {
|
||||
// Obsolete block from earlier Scratch versions.
|
||||
return util.target.getCostumes()[util.target.currentCostume].name;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Scratch3LooksBlocks;
|
||||
@@ -428,6 +428,11 @@ const specMap = {
|
||||
argMap: [
|
||||
]
|
||||
},
|
||||
'costumeName': {
|
||||
opcode: 'looks_costumename',
|
||||
argMap: [
|
||||
]
|
||||
},
|
||||
'sceneName': {
|
||||
opcode: 'looks_backdropnumbername',
|
||||
argMap: [
|
||||
|
||||
Reference in new issue
Block a user