Refactored NetscriptJS to take in the NS environment as a parameter to main

This commit is contained in:
danielyxie
2018-05-17 12:10:12 -05:00
parent 9a9096bc70
commit c7e155d4bc
25 changed files with 1490 additions and 682 deletions
+2 -1
View File
@@ -46,7 +46,7 @@ var keybindings = {
};
function isScriptFilename(f) {
return f.endsWith(".js") || f.endsWith(".script");
return f.endsWith(".js") || f.endsWith(".script") || f.endsWith(".ns");
}
var scriptEditorRamCheck = null, scriptEditorRamText = null;
@@ -345,6 +345,7 @@ Script.prototype.saveScript = function() {
//Calculate/update ram usage, execution time, etc.
this.updateRamUsage();
console.log(this.module);
this.module = "";
}