Commit Graph

9020 Commits

Author SHA1 Message Date
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
catloversg
775a1b1e4b CODEBASE: Refactor ImportSave component (#2505) 2026-02-15 10:57:40 -08:00
catloversg
77d83a2fdc UI: Add option to disable minimap in script editor (#2504) 2026-02-15 10:56:01 -08:00
catloversg
dc0c3b6fa3 JEST: Add tests for checking getAnswer and solver of coding contracts (#2503) 2026-02-15 10:53:58 -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
catloversg
b5ab495837 BUGFIX: Hacknet server UI shows NaN hash rate when 100% RAM is being used (#2500) 2026-02-15 10:27:21 -08:00
David Walker
a0bbdfd871 DARKNET: Refactor/adjust getPixelPosition (#2501)
This simplifies the logic. It also adjusts the position of special
servers slightly; in particular, they are horizontally centered
(appearing in-between the adjacent row, and not merely staggered).

The split into two functions is in preparation for perf improvements
that require calculating this without access to the server.
2026-02-13 20:19:17 -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
68700ff01f API: Expose ProgramName enum (#2492) 2026-02-13 11:51:42 -08:00
catloversg
be66b766a2 DOCUMENTATION: Fix invalid links in ns.sleep and ns.asleep (#2496) 2026-02-11 10:46:04 -08:00
David Walker
26b5c28df6 REFACTOR: Speed up by-ip lookups by introducing a new map entry (#2488)
Thankfully, the existing AllServers map is not exported, so we can
ensure that all the changes are only local to this file.

This also fixes a bug if renameServer was called with the same
name. (Probably calling code checked that case already.)
2026-02-11 10:43:52 -08:00
catloversg
826fd42296 DOCUMENTATION: Improve help text of scp and run (#2493) 2026-02-11 10:42:10 -08:00
catloversg
ac34d6508d BLADEBURNER: Stop randomizing action difficulty (#2491) 2026-02-11 10:36:10 -08:00
catloversg
638c791047 MISC: Change how coding contract rewards are randomized (#2490) 2026-02-11 10:34:59 -08:00
David Walker
62f7501b43 REFACTOR: Change getFailureResult to checkDarknetServer (#2494) 2026-02-11 08:42:27 -08:00
catloversg
97987fe35b BUGFIX: Global states are not reset properly between each Jest test (#2487) 2026-02-10 10:13:00 -08:00
catloversg
95b739f703 BUGFIX: Darknet state is not reset properly on prestige (#2486) 2026-02-10 09:39:31 -08:00
David Walker
ed727d6e74 DARKNET: Buff packet sniffing slightly (#2485)
Refactor the sniff code so that successful sniffs for the current server
are tagged server_name:password, not just those for adjacent servers.
2026-02-10 08:10:33 -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
Groot-0909
b99e522d1c UI: Update incorrect ps command shown in help (#2484) 2026-02-08 09:37:04 -08:00
catloversg
8633e94899 UI: Update icon of DARKNET_BACKDOOR and DARKNET_DEPTHS achievements (#2480) 2026-02-08 08:40:35 -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
425bff8217 DNET: Update documentation (#2483) 2026-02-07 19:25:56 -08:00
Michael Ficocelli
e649adfef4 DARKNET: Add improved challenge achievement for BN15 (#2479)
* DARKNET: Add improved challenge achievement for BN15

* DARKNET: Adjust heartbleed check location for achievement

* Fix wrong achievement data and update svg

* DARKNET: Fix styling of documentation link

* lint

---------

Co-authored-by: CatLover <152669316+catloversg@users.noreply.github.com>
2026-02-07 18:28:55 -08:00
gmcew
95d08d7722 Change fallback reward priorities (#2481) 2026-02-07 08:50:40 -08:00
Michael Ficocelli
60a8996707 DARKNET: Add extra hint to sorted echo puzzle at high levels (#2465) 2026-02-06 04:58:01 -08:00
Michael Ficocelli
451aed153f DARKNET: Add glossary of terms to the documentation page (#2469) 2026-02-06 04:57:30 -08:00
catloversg
4c7e3d0833 UI: Show karma in Stats page and explain what it is in documentation (#2475) 2026-02-05 10:07:51 -08:00
Michael Ficocelli
6ca7c677a9 DARKNET: Prevent blocked ram on the "darkweb" server (#2468) 2026-02-05 07:32:58 -08:00
catloversg
a29f2945c5 BUGFIX: Monaco shows wrong TSDoc of APIs that have "export" word (#2473) 2026-02-05 07:31:13 -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
David Walker
a16706a33b DOCS: Add a note to CONTRIBUTING.md about the npm peer dep issue (#2474) 2026-02-05 07:24:24 -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
77cc582bf9 DARKNET: make threads' bonus apply to timing attack puzzle's extra time per char (#2466) 2026-02-05 04:43:13 -08:00
Snarling
2d69387227 GITHUB: Update format created by "build artifacts" workflows (#2470)
* Change filenames and structure of build artifacts, for compatibility with steam version updating
Co-authored-by: CatLover <152669316+catloversg@users.noreply.github.com>
2026-02-04 22:59:40 -05:00
catloversg
79b3b9cb74 MISC: Update version number (#2462) 2026-02-03 04:56:05 -08:00
Michael Ficocelli
b9068ab328 DOCS: Fix some IPvGO docs that do not reflect winstreak rep converted to favor (#2463) 2026-02-03 04:55:38 -08:00
Michael Ficocelli
ba1c6f3818 IPVGO: Fix scoring of very large open areas (#2464) 2026-02-03 04:52:40 -08:00
catloversg
00339a206c DOCUMENTATION: Move current changelog to changelog-v2.md (#2461) 2026-02-03 04:14:17 -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
a674633f6c MISC: Update changelog (#2460) 2026-02-02 03:43:30 -08:00
catloversg
5a2bdfc9f1 CODEBASE: Update NodeJS to v24 (#2456) 2026-01-28 22:10:55 -08:00
catloversg
8b07879ad9 CODEBASE: Update SaveData type to be compatible with TS 5.9 and upgrade TS (#2457) 2026-01-28 12:26:06 -08:00
kaoticengineering
afddd284fc UI: Add settings to change currency symbol and whether to show it after money value (#2453) 2026-01-28 12:16:28 -08:00
catloversg
366c44d5c2 API: Add warning when installing backdoor on backdoored server with Singularity API (#2458) 2026-01-28 12:10:13 -08:00
catloversg
d7c1c7be72 UI: Remove BitNode's difficulty in BitNode selection popup (#2454)
* UI: Remove BitNode's difficulty in BitNode selection popup

* Run prettier
2026-01-25 20:34:54 -08:00
catloversg
5f519991a6 API: Allow ns.read to read .msg and .lit files (#2455) 2026-01-25 20:32:44 -08:00
catloversg
2edad3ed37 DOCUMENTATION: Update math notations in corporation docs (#2452) 2026-01-20 13:04:38 -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
Michael Ficocelli
19064a1b12 MISC: Improve script args validation message (#2451) 2026-01-18 11:34:49 -08:00