Code:
new List(
[spriteName].concat(
details
).concat([timestamp])
Language setting will invoke it,either by hand or by extension
ide.stage.fireUserEditEvent(
ide.currentSprite.name,
['project', 'language', lang],
ide.version
);
},
[details=""Changes" would invoke it"]
IDE_Morph.prototype.updateChanges = function (spriteName, details) {
//snip snip
this.stage.fireUserEditEvent(
spriteName || this.currentSprite.name,
details || [],
this.version
);
};
[/details]
[details="Recording unsaved changes(this is something a lot other stuff would invoke,including restore,editNotes,some stuff about categories,renaming scenes/projects,extensions obj_name and cst_embed,recordUserEdit,) or saving("save","export") would invoke it"]
IDE_Morph.prototype.recordUnsavedChanges = function (spriteName, details) {
this.scene.hasUnsavedEdits = true;
this.updateChanges(spriteName, details);
};
IDE_Morph.prototype.recordSavedChanges = function () {
this.scenes.itemsArray().forEach(scene => scene.hasUnsavedEdits = false);
this.updateChanges(this.currentSprite.name, ['project', 'save']);
};
[/details]
Recording user edits(another thing that a lot stuff invoke,including the macro blocks in control category,sprite setPivot,SpriteMorph.prototype.synchScriptsFrom,sprite setName,making variables/blocks by hand,hide/show blocks,dragging blocks from search panel,deleting/renaming variables by hand,adding costumes/sounds,perpetuateAndEdit,dropped image/audio,duplicating/cloning/releasing sprites,new/edit pivot/renaming/removing costumes,snapshotting/dropping costumes,renaming/removing/dropping sounds,dragging comments/scripts into palete(to destroy them),editing sprite draggability/rotation style by hand,adding sprites,duplicating/deleting blocks by hand,relabeling blocks by hand,custom block update,moving comments,setting label(?),moving blocks,anything on right click menu of blocks,setting input slots,expanding/collapsing comments)
SpriteMorph.prototype.recordUserEdit = function (...details) {
var ide = this.parentThatIsA(IDE_Morph);
if (ide) {
ide.recordUnsavedChanges(
this.name,
Array.from(details).concat(details[0] === 'scripts' ?
[this.scriptsOnlyXML()]
: []
)
);
}
};
ps:(unrelated) @dardoro,the primitive cst_embed will embed metadata without js function block