-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NETSCRIPT: Add .script deprecation notice & migration guide #1007
Conversation
Also I am unable to run prettier, hopefully that can be done via maintainer edits which should be enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The terms "ns1" and "ns2" are not really accurate and should not be used. .script are a legacy script format that is no longer supported, and .js are javascript files.
The original game documentation pretended that "Netscript" was the language used by game scripts. It's not it's own language, and it's helpful for players if they know the scripts they are writing are literally javascript. .script
files were an interpreted version of javascript based on es5, whereas .js
files are actual javascript modules running natively within the player's browser. We intentionally removed references to "ns1" and "ns2" a long time ago.
Netscript is still the name of the game's API, which is passed in as the first argument for player script main
functions with the default parameter name ns
. But there is no "ns1" or "ns2", as both script formats can access the same API (although some parts of it don't work in .script files)
So you want to go by just file extensions instead? Or do you want that specific "legacy script format" and "javascript files" distinction? |
Link to Doc page from terminal
It seems the distinction is in the "execution format" being deprecated, not anything Netscript-related. Netscript is the API and it stays. In that context the message applies to: "deprecating the ability to run '.script' files to access the Netscript API". |
@Snarling is that wording better? |
@LJNeon I made some additional changes and added some more content, mind looking this over before I merge it? Sorry for the delay in following up on this. |
Looks good to me! |
I don't feel the need to justify or explain this change as it has already been agreed to unanimously on Discord.
I can't test this PR, both the migration guide and the terminal warning need to be tested before merge.