diff options
| author | jmoenig <jens@moenig.org> | 2014-03-31 13:19:39 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-03-31 13:19:39 +0200 |
| commit | ce3340e623fd0f03ecb15de5ec54eda8113c7c67 (patch) | |
| tree | 76ce71a7196470455943d00c2a7bd64c548248b3 | |
| parent | 6fd93533ecb01c27589bfe569d8e22013a77f65c (diff) | |
| download | snap-ce3340e623fd0f03ecb15de5ec54eda8113c7c67.tar.gz snap-ce3340e623fd0f03ecb15de5ec54eda8113c7c67.zip | |
let “switch to costume” block accept actual costume objects (in addition to names and numbers)
| -rwxr-xr-x | history.txt | 1 | ||||
| -rw-r--r-- | objects.js | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/history.txt b/history.txt index 1399ba6..2c0362b 100755 --- a/history.txt +++ b/history.txt @@ -2108,3 +2108,4 @@ ______ ------ * Objects: experimental “wardrobe” and “jukebox” reporters in dev mode * Blocks, Objects: display costume thumbnails in speech/thought/value bubbles and watcher cells +* Objects: let “switch to costume” block accept actual costume objects (in addition to names and numbers) @@ -2291,6 +2291,11 @@ SpriteMorph.prototype.doWearPreviousCostume = function () { }; SpriteMorph.prototype.doSwitchToCostume = function (id) { + if (id instanceof Costume) { // allow first-class costumes + this.wearCostume(id); + return; + } + var num, arr = this.costumes.asArray(), costume; |
