Skip to content

Commit

Permalink
Revert "add SAY_OR_THINK getter"
Browse files Browse the repository at this point in the history
This reverts commit ffd2a2a.
  • Loading branch information
DD Liu committed Mar 19, 2020
1 parent db33da2 commit 7330129
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/blocks/scratch3_looks.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Scratch3LooksBlocks {
this.runtime.on('targetWasRemoved', this._onTargetWillExit);

// Enable other blocks to use bubbles like ask/answer
this.runtime.on(Scratch3LooksBlocks.SAY_OR_THINK, this._updateBubble);
this.runtime.on('SAY', this._updateBubble);
}

/**
Expand All @@ -60,16 +60,6 @@ class Scratch3LooksBlocks {
return 'Scratch.looks';
}

/**
* Event name for a text bubble being created or updated.
* @const {string}
*/
static get SAY_OR_THINK () {
// There are currently many places in the codebase which explicitly refer to this event by the string 'SAY',
// so keep this as the string 'SAY' for now rather than changing it to 'SAY_OR_THINK' and breaking things.
return 'SAY';
}

/**
* Limit for say bubble string.
* @const {string}
Expand Down Expand Up @@ -330,7 +320,7 @@ class Scratch3LooksBlocks {

say (args, util) {
// @TODO in 2.0 calling say/think resets the right/left bias of the bubble
this.runtime.emit(Scratch3LooksBlocks.SAY_OR_THINK, util.target, 'say', args.MESSAGE);
this.runtime.emit('SAY', util.target, 'say', args.MESSAGE);
}

sayforsecs (args, util) {
Expand All @@ -350,7 +340,7 @@ class Scratch3LooksBlocks {
}

think (args, util) {
this.runtime.emit(Scratch3LooksBlocks.SAY_OR_THINK, util.target, 'think', args.MESSAGE);
this.runtime.emit('SAY', util.target, 'think', args.MESSAGE);
}

thinkforsecs (args, util) {
Expand Down

0 comments on commit 7330129

Please sign in to comment.