From 0b594e59ab694eac68d99e74759cd95847d28e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Fri, 30 Jun 2017 09:45:59 +0200 Subject: [PATCH] =?UTF-8?q?migrate=20experimental=20=E2=80=9Cjukebox?= =?UTF-8?q?=E2=80=9D=20reporters=20to=20the=20new=20=E2=80=9Cmy=20sounds?= =?UTF-8?q?=E2=80=9D=20reporter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- history.txt | 1 + objects.js | 33 +++++---------------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/history.txt b/history.txt index 6fbcb69d..56255770 100755 --- a/history.txt +++ b/history.txt @@ -3490,6 +3490,7 @@ Fixes: 170630 ------ * Objects: reflect attribute inheritance status by ghosting / un-ghosting stage monitors +* Objects: migrate experimental “jukebox” reporters to the new “my sounds” reporter Features: diff --git a/objects.js b/objects.js index c29bad6d..4748c9e7 100644 --- a/objects.js +++ b/objects.js @@ -1227,6 +1227,7 @@ SpriteMorph.prototype.initBlocks = function () { SpriteMorph.prototype.initBlocks(); SpriteMorph.prototype.initBlockMigrations = function () { + // change blocks in existing projects to their updated version SpriteMorph.prototype.blockMigrations = { doStopAll: { selector: 'doStopThis', @@ -1256,6 +1257,10 @@ SpriteMorph.prototype.initBlockMigrations = function () { selector: 'reportGet', inputs: [['costumes']] }, + reportSounds: { + selector: 'reportGet', + inputs: [['sounds']] + }, doMapStringCode: { selector: 'doMapValueCode', inputs: [['String'], '<#1>'], @@ -1876,20 +1881,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(watcherToggle('getTempo')); blocks.push(block('getTempo')); - // for debugging: /////////////// - - if (this.world().isDevMode) { - blocks.push('-'); - txt = new TextMorph(localize( - 'development mode \ndebugging primitives:' - )); - txt.fontSize = 9; - txt.setColor(this.paletteTextColor); - blocks.push(txt); - blocks.push('-'); - blocks.push(block('reportSounds')); - } - } else if (cat === 'pen') { blocks.push(block('clear')); @@ -6680,20 +6671,6 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push(watcherToggle('getTempo')); blocks.push(block('getTempo')); - // for debugging: /////////////// - - if (this.world().isDevMode) { - blocks.push('-'); - txt = new TextMorph(localize( - 'development mode \ndebugging primitives:' - )); - txt.fontSize = 9; - txt.setColor(this.paletteTextColor); - blocks.push(txt); - blocks.push('-'); - blocks.push(block('reportSounds')); - } - } else if (cat === 'pen') { blocks.push(block('clear'));