markUpdated() for Script

This commit is contained in:
James Aguilar
2019-06-02 15:32:35 -04:00
parent c485fdfa87
commit 1236ad252b
4 changed files with 13 additions and 4 deletions
+9 -1
View File
@@ -68,6 +68,14 @@ export class Script {
}
}
/**
* Marks this script as having been updated. It will be recompiled next time something tries
* to exec it.
*/
markUpdated() {
this.module = "";
}
/**
* Save a script from the script editor
* @param {string} code - The new contents of the script
@@ -86,7 +94,7 @@ export class Script {
this.filename = filenameElem!.value;
this.server = serverIp;
this.updateRamUsage(otherScripts);
this.module = "";
this.markUpdated();
}
}