* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
* handle enums differently
* Enums are frozen and fed directly to the proxy
* Enums are not included in the NSFull definition, allowing samekeys for RamCostTree<API>, InternalAPI<API>, and ExternalAPI<API>
* Rewrote a lot of the ramcalc test, with better typing thanks to the samekeys above
* Fix ns1 for proxy (args, pid, and enums after above changes were not being added to ns1 scripts.)
* Fixed an overview issue where the bars could display inaccurately.
Update changelog and bump version to 2.2.1
* ns API is wrapped once
* when a new workerscript is created, each layer of ns is stamped with a private workerscript field that allows the functions to work.
* Test has been refactored to account for new method of wrapping
* BREAKING: ns functions need access to `this` value of their parent ns layer (or any ns layer)
* Enums are passed directly to player (no cloning) but are frozen.
* Add specific types for sleeve tasks
* Moved LocationName enum to overall enums file
* Add LocationName enum to those provided to player
* remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName)
* Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts
* also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else.
* Add support for enums at other ns layers
* APIWrapper: simplified wrapping algorithm and modified to just use cloneDeep to copy enums instead of recursively wrapping enums as if they were new API layers
* Improve APIWrapper typing
* Changed some typings at RamCostGenerator to allow for enums at different levels without enums needing a ram cost
* Added enums to ns.corporation, removed getter functions that were being used instead.
* Add FactionWorkType for player use
* Add ClassType and CompanyWorkPos enums
* Change netscriptDefinitions to expect members of these new enums where appropriate.
* Instead of hardcoded categories, automatically walk through all layers of ns, check for their associated costs, and check that ingame static and dynamic costs match the expected assigned costs.
* RamCostGenerator will have an error if ramcosts are defined for nonexistent functions, in addition to error if not all functions have ram costs defined
* Removed a few random blank comment lines in NetscriptDefinitions.d.ts
* RamCalculation.test.ts checks exact expected static and dynamic ram usage from (almost) every function, based on defined RamCosts in RamCostGenerator.
Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give these things their own tsconfig.json files.
That being done, adding "jest" to the global types lets us remove all
those imports.
Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give cypress its own tsconfig.json file.
That being done, adding "jest" to the global types lets us remove all
those imports.
It lets us bundle static files such as images.
Allows us to `imports img from "./img.png"` to retrieve an image's path.
Note that we'll have to add other entries in the global.d.ts file if we
want to handle other extensions than .png.
Adds mocks to Jest tests so that we don't fail tests when loading static
assets.
* Make command `cd` without arguments an alias for `cd /` (#853)
In most shells `cd` without arguments takes you to the home directory
of the current user. I keep trying to do this due to muscle memory
from working in terminals, so I figured I'd make it do something useful.
There is no home directory in the game, but going to / is the closest
thing we have, since that is the starting point for the user in the
game.
* Add new `backdoor` terminal command (#852)
* Add the backdoor command to the terminal
This command will perform a manual hack without rewarding money. It will be used for the story, mainly for faction hacking tests
* Add tab completion for backdoor command
* Add help text for backdoor command
* Change condition syntax to be more consistent with others
* Extract reused code block so it is always called after actions
* Update documentation for new backdoor command
Modified references to manual hack as it isn't for factions anymore
* Remove extra parenthesis
* Rename manuallyHacked to backdoorInstalled
* Fix typo
* Change faction test messages to use backdoor instad of hack
* Rename more instances of manuallyHacked
* fixed typo in helptext of darkweb buy (#858)
* Fix typos and unify descriptions of augmentations (#859)
Made an attempt to...
- give all "+rep% company/faction" the same text
- make all augmentations with a single effect use a single line to describe the effect
- make all effects end with a period
* Made Cashroot starter kit display its tooltip with the money formatted properly and in gold
* fix typo in docs (#860)
* Initial code for Casino Card Deck implementation
* Casino Blackjack Implementation
* Update some tools (eslint, typescript)
* Blackjack code cleanup
* Update README_contribution
* Update ScriptHelpers.js (#861)
expand error message
* More augmentation typo fixes (#862)
* Add Netscript function getCurrentScript (#856)
Add netscript function that returns the current script.
* Added milestones menu to guide new players. (#865)
Milestone menu
* fix typos in milestones (#866)
Co-authored-by: sschmidTU <s.schmid@phonicscore.com>
* Corrupt location title when backdoor is installed (#864)
* Add corruptableText component
* Corrupt location title if backdoor is installed
* Formatting
* Add helper to check value of backdoorInstalled
Helper could be oneline but it would make it less readable
* Fix some formatting
* Add settings option to disable text effects
* Import useState
* getRunningScript (#867)
* Replaced getCurrentScript with getRunningScript
* Bunch of smaller fixes (#904)
Fix#884Fix#879Fix#878Fix#876Fix#874Fix#873Fix#887Fix#891Fix#895
* rework the early servers to be more noob friendly (#903)
* v0.51.6
Co-authored-by: Andreas Eriksson <2691182+AndreasTPC@users.noreply.github.com>
Co-authored-by: Jack <jackdewinter1@gmail.com>
Co-authored-by: Teun Pronk <5228255+Crownie88@users.noreply.github.com>
Co-authored-by: Pimvgd <Pimvgd@gmail.com>
Co-authored-by: Daniel Xie <daniel.xie@flockfreight.com>
Co-authored-by: Simon <33069673+sschmidTU@users.noreply.github.com>
Co-authored-by: sschmidTU <s.schmid@phonicscore.com>