From c19e5d0fe630c5b18c51fc6be343a63942afccca Mon Sep 17 00:00:00 2001 From: Sage Pointer Date: Mon, 3 Jan 2022 07:31:48 +0200 Subject: [PATCH 1/5] Fix some achievements not triggered if hacked with backdoor command Moving to BitVerse and returning from function happened before setting backdoorInstalled property to true, so Achievement Handler believed the current BitNode was not finished (unless we applied backdoor through hack command, which has correct code). --- src/Terminal/Terminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Terminal/Terminal.ts b/src/Terminal/Terminal.ts index 4f5f276a7..de857e2bd 100644 --- a/src/Terminal/Terminal.ts +++ b/src/Terminal/Terminal.ts @@ -285,6 +285,7 @@ export class Terminal implements ITerminal { return; } if (!(server instanceof Server)) throw new Error("server should be normal server"); + server.backdoorInstalled = true; if (SpecialServers.WorldDaemon === server.hostname) { if (player.bitNodeN == null) { player.bitNodeN = 1; @@ -292,7 +293,6 @@ export class Terminal implements ITerminal { router.toBitVerse(false, false); return; } - server.backdoorInstalled = true; this.print("Backdoor successful!"); } } From c48aaed6c57b6fa73dcba642bb05bbe5aea9000b Mon Sep 17 00:00:00 2001 From: KenJohansson Date: Fri, 7 Jan 2022 18:25:17 +0100 Subject: [PATCH 2/5] Update netscriptjs.rst Removed references to .ns and changed those to .js. Also fixed minor spelling/grammar mistake. --- doc/source/netscript/netscriptjs.rst | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/source/netscript/netscriptjs.rst b/doc/source/netscript/netscriptjs.rst index 316aa1906..84365306b 100644 --- a/doc/source/netscript/netscriptjs.rst +++ b/doc/source/netscript/netscriptjs.rst @@ -21,11 +21,11 @@ As of the time of writing this, a few browsers do not support `dynamic import `_, @@ -117,7 +117,7 @@ early-hack-template.script } } -early-hack-template.ns +early-hack-template.js .. code-block:: javascript @@ -151,8 +151,8 @@ You may have noticed that every new ns2 file will contains the following comment * @param {NS} ns **/ -This comment is used to help the text editor autocomplete functions in the Netscript API. You can enabling it by pressing ctrl+space after `ns.` +This comment is used to help the text editor autocomplete functions in the Netscript API. You can enable it by pressing ctrl+space after `ns.` .. image:: autocomplete.png -The comment can be safely removed but it is recommended to keep it as it will help you. \ No newline at end of file +The comment can be safely removed but it is recommended to keep it as it will help you. From 1c9a1b6c1954f6f60f1f0c66627b83c33080f6be Mon Sep 17 00:00:00 2001 From: KenJohansson Date: Fri, 7 Jan 2022 18:42:37 +0100 Subject: [PATCH 3/5] Update terminal.rst Removed references to .ns. --- doc/source/basicgameplay/terminal.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/basicgameplay/terminal.rst b/doc/source/basicgameplay/terminal.rst index 1ee640f24..89f6abc70 100644 --- a/doc/source/basicgameplay/terminal.rst +++ b/doc/source/basicgameplay/terminal.rst @@ -425,7 +425,7 @@ nano $ nano [filename] -Opens up the specified file in the Text Editor. Only scripts (.script, .ns, .js) and +Opens up the specified file in the Text Editor. Only scripts (.script, .js) and text files (.txt) can be edited. If the file does not already exist, then a new empty file will be created. @@ -595,7 +595,7 @@ wget $ wget [url] [target file] Retrieves data from a url and downloads it to a file on the current server. -The data can only be downloaded to a script (.script, .ns, .js) or a text file +The data can only be downloaded to a script (.script, .js) or a text file (.txt). If the target file already exists, it will be overwritten by this command. Note that will not be possible to download data from many websites because they From 4010e5791f973edefa75111fa002a6061cf0fbda Mon Sep 17 00:00:00 2001 From: KenJohansson Date: Fri, 7 Jan 2022 18:44:56 +0100 Subject: [PATCH 4/5] Update scripts.rst Removed reference to .ns --- doc/source/basicgameplay/scripts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/basicgameplay/scripts.rst b/doc/source/basicgameplay/scripts.rst index 2eec791a5..d96468d2f 100644 --- a/doc/source/basicgameplay/scripts.rst +++ b/doc/source/basicgameplay/scripts.rst @@ -106,7 +106,7 @@ Check how much RAM a script requires to run with n threads **nano [script]** Create/Edit a script. The name of the script must end with a valid -extension: .script, .js, or .ns +extension: .script, or .js **ps** From d015f7bca11d5a69b566e72a821d444f9c29478d Mon Sep 17 00:00:00 2001 From: KenJohansson Date: Fri, 7 Jan 2022 18:46:47 +0100 Subject: [PATCH 5/5] Update autocomplete.rst Removed references to .ns --- doc/source/netscript/advancedfunctions/autocomplete.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/netscript/advancedfunctions/autocomplete.rst b/doc/source/netscript/advancedfunctions/autocomplete.rst index 22fefe4b1..c8371d43d 100644 --- a/doc/source/netscript/advancedfunctions/autocomplete.rst +++ b/doc/source/netscript/advancedfunctions/autocomplete.rst @@ -7,7 +7,7 @@ autocomplete() Netscript Function :RAM cost: 0 GB :param Object data: general data about the game you might want to autocomplete. - :param string[] args: current arguments. Minus `run script.ns` + :param string[] args: current arguments. Minus `run script.js` data is an object with the following properties:: @@ -34,6 +34,6 @@ autocomplete() Netscript Function .. code-block:: bash - $ run demo.ns mega\t + $ run demo.js mega\t // results in - $ run demo.ns megacorp + $ run demo.js megacorp