mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
add "scratch_extension" only if a block has an icon
This commit is contained in:
parent
107e49245f
commit
a27ea76d25
1 changed files with 2 additions and 2 deletions
|
@ -1003,8 +1003,7 @@ class Runtime extends EventEmitter {
|
||||||
category: categoryInfo.name,
|
category: categoryInfo.name,
|
||||||
colour: categoryInfo.color1,
|
colour: categoryInfo.color1,
|
||||||
colourSecondary: categoryInfo.color2,
|
colourSecondary: categoryInfo.color2,
|
||||||
colourTertiary: categoryInfo.color3,
|
colourTertiary: categoryInfo.color3
|
||||||
extensions: ['scratch_extension']
|
|
||||||
};
|
};
|
||||||
const context = {
|
const context = {
|
||||||
// TODO: store this somewhere so that we can map args appropriately after translation.
|
// TODO: store this somewhere so that we can map args appropriately after translation.
|
||||||
|
@ -1024,6 +1023,7 @@ class Runtime extends EventEmitter {
|
||||||
const iconURI = blockInfo.blockIconURI || categoryInfo.blockIconURI;
|
const iconURI = blockInfo.blockIconURI || categoryInfo.blockIconURI;
|
||||||
|
|
||||||
if (iconURI) {
|
if (iconURI) {
|
||||||
|
blockJSON.extensions = ['scratch_extension'];
|
||||||
blockJSON.message0 = '%1 %2';
|
blockJSON.message0 = '%1 %2';
|
||||||
const iconJSON = {
|
const iconJSON = {
|
||||||
type: 'field_image',
|
type: 'field_image',
|
||||||
|
|
Loading…
Reference in a new issue