saved clones no longer forget if they inherit the "costume #" attribute

pull/89/head
jmoenig 2019-08-08 12:37:37 +02:00
rodzic 6cc70b6d11
commit 15b7bdc92c
3 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -9,6 +9,7 @@
* generated costumes that are not in the wardrobe are now made persistent in the project (saved & restored)
* **Notable Fixes:**
* fixed tainted audio context for auto-playing projects when the user interacts, thanks, Bernat!
* saved clones no longer forget if they inherit the "costume #" attribute
* **Translation Updates:**
* German
* Galician, thanks, Miguel!
@ -16,6 +17,7 @@
### 2019-08-08
* store: allow wardrobe-less costumes to be shared among several sprites (e.g. when inheriting the "costume #" attribute)
* objects: fixed an issue when a sprite inherits both the wardrobe and the costume #
* store, objects: fixed the bug that made clones forget inheritance of costume # when saved
### 2019-08-07
* new dev version

Wyświetl plik

@ -1910,12 +1910,12 @@ SpriteMorph.prototype.drawNew = function () {
cst = this.costume;
handle = setInterval(
function () {
myself.wearCostume(cst);
myself.wearCostume(cst, true);
clearInterval(handle);
},
100
);
return myself.wearCostume(null);
return myself.wearCostume(null, true);
}
}

Wyświetl plik

@ -520,9 +520,13 @@ SnapSerializer.prototype.rawLoadProjectModel = function (xmlNode, remixID) {
}
});
if (sprite.inheritsAttribute('costumes')) {
costume = sprite.costumes.asArray()[
sprite.inheritanceInfo.costumeNumber - 1
];
if (sprite.inheritsAttribute('costume #')) {
costume = sprite.exemplar.costume;
} else {
costume = sprite.costumes.asArray()[
sprite.inheritanceInfo.costumeNumber - 1
];
}
if (costume) {
if (costume.loaded) {
sprite.wearCostume(costume, true);