Commit Graph

92 Commits

Author SHA1 Message Date
Michael Ficocelli 00a1bc2f6e DNET: Remove bonus time effect on authentication and heartbleed speed; fix ram rounding (#2627) 2026-04-10 16:04:05 -07:00
Lee Stutzman be6fcd206f API: Rename ns.gang.getOtherGangInformation to getAllGangInformation (#2635) 2026-04-10 15:59:39 -07:00
Michael Ficocelli 5c02f81dc7 DNET: Remove packet capture (#2594)
* DNET: Remove packet capture as an API tool; add the mechanic as part of the logs in the Open Web Access Point puzzle

* DNET: Make harder version of the packet capture puzzle just have alphanumeric noise instead of lore data and stuff

* DNET: Make harder version of the packet capture puzzle just have alphanumeric noise instead of lore data and stuff

* PR feedback
2026-03-26 18:27:30 -07:00
Michael Ficocelli 1b6b07faae DNET: Player feedback (#2545) 2026-03-19 21:07:43 -07:00
catloversg 3813d03fb6 MISC: Rework intelligence override (#2575) 2026-03-19 20:09:37 -07:00
David Walker b6a29681f4 BUGFIX: Fix webstorm by using a mutationLock (#2542) 2026-03-06 11:11:06 -08:00
David Walker dc5c43db2e REFACTOR: Make getPlayer 10x faster (#2548) 2026-03-03 14:21:34 -08:00
Michael Ficocelli 3d41c348bc DNET: Rebalance / player feedback (#2533) 2026-02-28 11:48:03 -08:00
David Walker 8f4313b180 Revert "PIPE: Add pipe support for passing data into and out of terminal commands (#2395)" (#2524)
This reverts commit 92b8b58588.

Accidental merge on my part - the code is in decent shape, but isn't meant to go in for 3.0.
2026-02-22 11:28:10 -08:00
Michael Ficocelli 92b8b58588 PIPE: Add pipe support for passing data into and out of terminal commands (#2395) 2026-02-22 11:18:23 -08:00
catloversg dd78a2cb44 API: Remove RAM cost of hacknet namespace and set RAM cost of each hacknet API (#2502)
* API: Remove RAM cost of hacknet namespace and set RAM cost of each hacknet API

* Fix Jest tests

* Update based on feedback
2026-02-16 09:00:02 -08:00
David Walker b51ed8fd59 BUG: Fix missed cases in offline server handling (#2495)
There were two large holes in the existing offline server handling:

1. It didn't include IPs, so scripts that used IPs instead of hostnames
   would get exceptions thrown for "server not found."
2. Coverage was very low for non-Darknet APIs. Maybe most of them don't
   need to be covered, but many obvious ones like "ps", "killall" and
   "hasRootAccess" were missing. IMO the only reliable answer is one
   that enforces *all* are covered via the type system.

To accomplish the second part, helpers.getServer() was changed to return
null when a server is offline. This intentionally breaks a lot of its
utility, which was to return a server unconditionally. To compensate,
its utility was increased - it now also does unknown argument
processing, allowing it to subsume a common line that all callers were
repeating.

Some callers switched to ctx.workerScript.getServer(), because they
didn't actually need to be using helpers.getServer(). Similarly, a few
callsites switched to GetServerOrThrow(), for the cases where it should
be guaranteed that the server is valid. The rest are returning a
default/failure response when the server is offline. (Except for
contracts, which threw on failure already anyway.)
2026-02-15 10:29:47 -08:00
Michael Ficocelli 26db9f2955 DNET: More fixes and feedback (#2489)
* Add some re-rendering improvements to avoid the canvas and visual servers getting desynched

* removed underlevelled nerf to low-level servers; improved charisma level docs

* Remove offscreen dynamic culling

* PR feedback; add cache file names to tooltip

* Ensure stasis link servers get loaded properly; ensure darkweb has neighbors to prevent unit tests from failing; remove extra optional chaining accessors
2026-02-13 17:23:24 -08:00
catloversg 95b739f703 BUGFIX: Darknet state is not reset properly on prestige (#2486) 2026-02-10 09:39:31 -08:00
Michael Ficocelli bab6280735 DNET: Add JS object properties as server names; refactor save/load/server storage to support this (#2482) 2026-02-10 00:13:47 -08:00
David Walker b5da311133 REFACTOR: Consolidate checks under getFailureResult() (#2476)
There was duplicated code, and more importantly, were were handling
certain things subtly differently in exec() and scp() as a result. This
notably causes a behavior change in exec() and scp() where failure to
authenticate now returns failure instead of throwing, which I believe is
the proper response.

This also makes it easier to see in the code exactly which functions
require what (auth, session, etc.)
2026-02-08 08:39:42 -08:00
Michael Ficocelli 0eae02adcf DARKNET: Improve documentation; remove requirement that getBlockedRam and getDepth be called on a darknet server (#2472) 2026-02-05 07:28:06 -08:00
catloversg 796bef81b3 BUGFIX: Sleeves can earn exp and purchase augmentations when enabling disableSleeveExpAndAugmentation (#2467) 2026-02-05 04:47:24 -08:00
Michael Ficocelli 6073964768 DARKNET: Darkweb Expansion Project & Bitnode (#2139)
This is BN15. It is a really big change; see the PR for all the details.
2026-02-03 03:40:36 -08:00
catloversg 5a2bdfc9f1 CODEBASE: Update NodeJS to v24 (#2456) 2026-01-28 22:10:55 -08:00
TheAimMan 210c338f86 SLEEVES: Add sleeve commands to purchase sleeves and memory via the API (#2443) 2026-01-20 12:55:51 -08:00
gmcew 7c0286222c API: Move and rename purchased server functions to cloud API (#2367)
* Convert purchased server functions to cloud API

- Create `ns.cloud`
- Change `bitnode multipliers` and `server constants` wording for consistency
- change `server`, `ram` and `getting started` docs for consistency
- Added changes to 3.0.0 API Break and `setRemovedFunctions` in NetscriptFunctions.js

Tested by
- running tutorial `purchase-server-8gb.js`, and a more typical player one
- buying manually using vendor (Alpha Ent in Sector 12)
- deleting them all using script, and checked all deleted functions gave correct error
- Imported completed save to ensure auto-transfer of function work

* Revision in line with comments

- changed more `purchased` to `cloud` references
- Added BN mults auto-conversion

* Update getting_started.md

 - Corrected function names for new `cloud API`

* Don't show `cloud API` warning

v3.0.0 API break auto-replaces `cloud` functions, not warning suggested.

* API Break correction

- `cloud` affected API break replacement changed to be more descriptive and functional

* Fix typo and add empty lines

* Update many things (check commit's description)

- Comments
- Terminal message
- UI Text
- TSDoc
- md docs
- Improve error messages in src\NetscriptFunctions\Cloud.ts
2025-11-07 12:10:33 -08:00
catloversg 6837f334fd CODEBASE: Remove redundant check in getServer utility function and serverExists API (#2357) 2025-10-19 11:45:30 -07:00
catloversg d421d4fcf9 MISC: Make TIX access independent from WSE account (#2342) 2025-10-11 17:28:45 -07:00
Michael Taylor 370424af2d JEST: Quiet Jest tests output on expected failures (#2332) 2025-10-05 12:31:15 -07:00
catloversg 020b185377 JEST: Enable restoreMocks option and fix lint errors (#2333)
* JEST: Enable restoreMocks option and fix lint errors

* Fix test\jest\Save.test.ts
2025-10-04 14:38:50 -07:00
catloversg 8aa73b2c65 MISC: Detect circular dependencies when generating modules (#2194) 2025-06-21 13:32:47 -07:00
Michael Ficocelli 18f84396e2 FEATURE: Add "Recent Errors" tab and improved error modal (#2169) 2025-06-16 16:43:21 -07:00
catloversg a9900072da MISC: Remove support for running NS1 scripts (#2083) 2025-04-11 13:41:48 -07:00
catloversg 7f443427ea CODEBASE: Suppress false-positive console errors caused by RamCalculation.test.ts (#2002) 2025-03-07 15:15:54 -08:00
catloversg 23ad55554e UI: Add "Run" action to run current script in editor (#1987) 2025-03-04 02:43:31 -08:00
catloversg de6b202341 CODEBASE: Refactor Player.applyForJob (#1947) 2025-02-02 09:29:18 -08:00
catloversg a4217b448a MISC: Standardize behavior of connect CLI and Singularity API (#1933) 2025-01-31 11:20:17 -08:00
catloversg ada903f356 CODEBASE: Refactor ns.singularity.purchaseAugmentation (#1879) 2025-01-28 10:42:25 -08:00
catloversg 0f9144a059 CODEBASE: Validate theme, editor theme, and styles (#1789) 2025-01-08 19:20:05 -08:00
catloversg 1e6c9d69e2 JEST: Move TerminalMatching.test.ts (#1801) 2024-11-27 01:23:51 -08:00
catloversg bb0b857f71 JEST: Add tests for b1tflum3 and destroyW0r1dD43m0n API (#1802) 2024-11-27 00:06:11 -08:00
Denis Čahuk cde5e3f6ae MISC: Refactor BLADEBURNER Identifier Lookup (#1646) 2024-09-14 17:39:18 -07:00
Marvin Sautter dd59612121 JEST: Decrease frequency of random Bladeburner Tests by ~59% for improved performance (#1648) 2024-09-09 18:33:37 -07:00
Yichi Zhang 028e779602 NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. (#1617) 2024-08-23 21:23:41 -07:00
catloversg 818d7446be MISC: Rename getRandomArbitrary (#1605) 2024-08-21 16:50:51 -07:00
catloversg cacecda72f API: Add types for parameters of gym-university-bladeburner API (Fix merging error) (#1596)
* API: Add types for parameters of gym-university-bladeburner API
* Fix merging error
2024-08-17 14:08:55 -07:00
David Walker 34db6e8b26 NETSCRIPT: Rework disableLog for efficiency (#1589)
The current implementation was naive; disableLog("ALL") was storing a
key for every function, and iterating over a different object to do it
(when iterating over objects is quite slow).

The common cases of Bitburner (and especially batching, where efficiency
matters most) are either never disabling anything, or disabling "ALL".
This optimizes for these two cases, at the expense of slightly more
complicated code to deal with the less-common edge cases.
2024-08-16 19:10:20 -07:00
catloversg 289f60d8c8 BLADEBURNER: Add API to calculate max upgrade count of skill (#1475) 2024-08-16 13:15:20 -07:00
catloversg 864613c616 MISC: Support JSX, TS, TSX script files (#1216) 2024-07-14 14:47:10 -07:00
David Walker 1f2e69631e EDITOR: Use ramOverride() to set compiled script RAM (#1446)
To use this, add a line like "ns.ramOverride(2);" as the first statement
in main(). Not only will it take effect at runtime, but it will now
*also* be parsed at compile time, changing the script's static RAM
limit. Since ns.ramOverride is a 0-cost function, the call to it on
startup then becomes a no-op.

This is an often-requested feature, and allows for scripts to set their
usage without it needing to be explicitly mentioned via args or options
when being launched. This also reduces pressure on the static RAM
analysis to be perfect all the time. (But certain limits, such as
"functions names must be unique across namespaces," remain.)

This also adds a tooltip to the RAM calculation, to make this slightly
discoverable.
2024-07-05 17:32:46 -07:00
Caldwell f40d4f8e92 BUGFIX: fix relative imports (#1305)
Relative paths work in imports, at last.
2024-06-02 17:38:01 -07:00
Shy 4aaf845fca API: make ns.atExit add the callback to an array instead of setting it (#1059) 2024-03-05 19:22:45 -05:00
Snarling 91105c6d8c TESTS: Prevent some test spam (#1126) 2024-02-26 08:22:33 -05:00
Caldwell 269a74d5c0 CODEBASE: update dependencies (#852) 2023-10-07 18:52:48 -04:00