mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -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_goforwardbackwardlayers: this.goForwardBackwardLayers,
|
||||||
looks_size: this.getSize,
|
looks_size: this.getSize,
|
||||||
looks_costumenumbername: this.getCostumeNumberName,
|
looks_costumenumbername: this.getCostumeNumberName,
|
||||||
|
looks_costumename: this.getCostumeName,
|
||||||
looks_backdropnumbername: this.getBackdropNumberName
|
looks_backdropnumbername: this.getBackdropNumberName
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -488,6 +489,11 @@ class Scratch3LooksBlocks {
|
||||||
// Else return name
|
// Else return name
|
||||||
return util.target.getCostumes()[util.target.currentCostume].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;
|
module.exports = Scratch3LooksBlocks;
|
||||||
|
|
|
@ -428,6 +428,11 @@ const specMap = {
|
||||||
argMap: [
|
argMap: [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
'costumeName': {
|
||||||
|
opcode: 'looks_costumename',
|
||||||
|
argMap: [
|
||||||
|
]
|
||||||
|
},
|
||||||
'sceneName': {
|
'sceneName': {
|
||||||
opcode: 'looks_backdropnumbername',
|
opcode: 'looks_backdropnumbername',
|
||||||
argMap: [
|
argMap: [
|
||||||
|
|
Loading…
Reference in a new issue