Copying a NetscriptJS script with scp now properly clears its 'module'.

This commit is contained in:
danielyxie
2018-06-29 00:39:05 -05:00
parent e621cac0a8
commit c8421168b6
5 changed files with 60 additions and 41 deletions

View File

@@ -498,7 +498,12 @@ let CONSTANTS = {
"at levels 1, 2, and 3, respectively (increased from 8%, 12%, 14%)<br>" +
"* The effect of Source-File 12 is now additive with itself, rather than multiplicative. This means " +
"that level N of Source-File 12 now increases all multipliers by N%<br>" +
"* The setting to suppress the confirmation box when purchasing Augmentations was moved into the main Options menu (by Github user hydroflame)<br>"
"* The setting to suppress the confirmation box when purchasing Augmentations was moved into the main Options menu (by Github user hydroflame)<br>" +
"* Bug Fix: Crime Success rates were being calculated incorrectly (by Github user hydroflame)<br>" +
"* When an Infiltration is finished, you will now return back to the company's page, rather than the city<br>" +
"* Infiltration faction reputation selector now remembers your last choice<br>" +
"* Bug Fix: Copying a NetscriptJS script to another server using scp now properly takes into account " +
"the script's changes.<br>"
}

View File

@@ -877,6 +877,7 @@ function NetscriptFunctions(workerScript) {
var oldScript = destServer.scripts[i];
oldScript.code = sourceScript.code;
oldScript.ramUsage = sourceScript.ramUsage;
oldScript.module = "";
return true;
}
}

View File

@@ -304,7 +304,7 @@ $(document).keyup(function(e) {
})
//Implements a tab completion feature for terminal
// command - Command (first arg only)
// command - Terminal command except for the last incomplete argument
// arg - Incomplete argument string that the function will try to complete, or will display
// a series of possible options for
// allPossibilities - Array of strings containing all possibilities that the
@@ -1466,6 +1466,7 @@ let Terminal = {
var oldScript = destServer.scripts[i];
oldScript.code = sourceScript.code;
oldScript.ramUsage = sourceScript.ramUsage;
oldScript.module = "";
post(scriptname + " overwriten on " + destServer.hostname);
return;
}