mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Implement costume name block
This commit is contained in:
parent
173fb6127c
commit
404834018b
2 changed files with 11 additions and 0 deletions
|
@ -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: [
|
||||
|
|
Loading…
Reference in a new issue