let “switch to costume” block accept actual costume objects (in addition to names and numbers)

pull/3/merge
jmoenig 2014-03-31 13:19:39 +02:00
rodzic 6fd93533ec
commit ce3340e623
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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;