Commit Graph

197 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 d1b6acc57a CODEBASE: Replace ipExists() linear scan with O(1) Map.has() (#2621) 2026-04-02 19:13:35 -07:00
catloversg 3d5079a4e6 REFACTOR: Remove duplicate random alphanumeric string functions (#2601) 2026-03-26 21:49:20 -07:00
catloversg 342dea77fa API: Make ns.cloud.purchaseServer() and ns.cloud.deleteServer() use hostname as provided (#2560) 2026-03-08 13:57:13 -07:00
Michael Ficocelli 9279b16729 DNET: Adjust balance from player feedback (#2512) 2026-02-18 13:41:48 -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 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
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
Nicholas Colclasure edf3d11b72 LORE: Add literature expanding the augment prestige lore (#2433) 2026-01-03 13:49:42 -08:00
imcute_aaaa bb50272e54 MISC: Avoid reinventing core bonus calculation and fix formatting issue (#2387) 2025-11-19 14:18:54 -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 073dd43d94 DEVMENU: Reset hacknet server list properly when setting level of SF9 (#2177) 2025-07-11 12:57:38 -07:00
catloversg a794fddaf7 MISC: Add file metadata (timestamps) (#2199) 2025-06-16 16:34:06 -07:00
catloversg 43e5589e61 MISC: ns.hacknet.spendHashes handles invalid targets in same way as UI (#2102) 2025-05-17 22:39:10 -07:00
catloversg eea6733e3b MISC: Export crash report when a fatal error occurs (#2106) 2025-05-10 22:45:37 -07:00
Naga 0aaa28054a NETSCRIPT: Add functionality and support to fully allow Players to use IP addresses in place of hostnames (#1990) 2025-04-10 18:41:37 -07:00
G4mingJon4s b61e93b246 CODINGCONTRACT: Move internals to a separate folder (#1932) 2025-02-11 22:04:23 -08:00
catloversg 9bf408221c CODEBASE: Merge TypeAssertion files (#1922) 2025-01-24 11:06:39 -08:00
catloversg 8c19165323 BUGFIX: Grow log shows invalid values in edge cases (#1872) 2025-01-08 18:48:45 -08:00
catloversg 1cb2a83b4f UI: Share RAM to boost reputation gain (#1862) 2025-01-07 22:35:29 -08:00
catloversg 68a436cb77 UI: Disable buttons when player cannot buy things in tech vendor (#1881)
* UI: Disable buttons when player cannot buy things in tech vendor

* Tweak reachMaxCore warning comment

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-01-04 16:34:48 -08:00
catloversg 7a4b3e23c1 CODEBASE: Show error dialog when finding out old bugs in pre-v2.4.0 (#1816)
* CODEBASE: Show error dialog when finding out old bugs in pre-v2.4.0

* Only show error dialog once
2024-11-30 15:31:44 -08:00
catloversg bb0b857f71 JEST: Add tests for b1tflum3 and destroyW0r1dD43m0n API (#1802) 2024-11-27 00:06:11 -08:00
catloversg 05da0efc81 REFACTOR: Mitigate cyclic dependency between Jsonable classes (#1792) 2024-11-23 15:53:31 -08:00
catloversg 04611a30b6 MISC: Remove duplicate usages of special server's hostname (#1781) 2024-11-19 11:47:34 -08:00
catloversg 75cf9c88b5 CODEBASE: Fix lint errors 3 (#1758)
This is a really big refactor because it actually *fixes* a lot of the lint errors instead of disabling them.
2024-11-14 08:18:57 -08:00
catloversg 4d60c833cc MISC: Remove mention of Hacking Mission (#1684) 2024-10-06 22:58:24 -07:00
Sol 8d9f63f49f UI: Fix incorrect information given in pserv upgrade error msg. (#1602) 2024-08-21 17:48:55 -07:00
catloversg 1a8dcad02b BUGFIX: Duplicated program in edge case (#1549) 2024-08-05 13:43:56 -07:00
Yichi Zhang 0dd42a1d57 TERMINAL: Stop terminal scp from revealing and copying to unreachable servers (#1542) 2024-08-03 23:38:00 -07:00
Tom Prince c3dc275d34 MISC: Show values of constants in type hints. (#1515) 2024-07-26 01:56:09 -07:00
catloversg 783120c886 FEATURE: BitNode options (#1411) 2024-07-14 14:30:30 -07:00
TheAimMan 101914b660 MISC: Add a potential of more than 1 core for initial servers (#963) 2024-06-04 09:50:28 -04:00
catloversg 175af0bd28 BUGFIX: Improve implementation of getRandomInt (#1282) 2024-05-18 15:12:06 -07:00
catloversg d4bdb8de2b MISC: Rework reputation bonus after installing a backdoor (#1236) 2024-04-28 18:35:56 -07:00
David Walker 75dabd10be NETSCRIPT: add formulas.hacking.growAmount() (#1090)
Also, improve docs.
2024-03-26 03:26:50 -07:00
LJ 1577467fe1 BUGFIX: Prevent renaming servers to hacknet. (#1112)
* Add hacknet check to renaming
* Handle manual server purchases
* Handle automated server purchases
* Remove unnecessary parenthesis

fixes #1111
2024-02-20 18:22:24 -08:00
Snarling 9b483bdd8a Servers are sorted on Active Scripts page (#1102) 2024-02-16 21:06:18 -05:00
Caldwell 8c8af38a3a MISC: refactor weaken effect calculation (#1076)
so far we calculate the effect of weaken in three +1 places
ns.weaken
ns.weakenAnalyze
terminal weaken

and server.weaken where the bn mult is applied

i extracted the logic into a new netscript helper function getWeakenEffect
this gives us one place if we want to change the formula

a side effect i added the server.cpuCores to the terminal weaken to future proof it if the npc server core pr (#963) is merged
2024-02-16 17:18:16 -08:00
Caldwell 4d551915b3 MISC: move server constants into their own constant (#1075) 2024-02-10 04:13:42 -05:00
David Walker 55e21d1e19 Make grow formulas faster and more accurate. (#1044) 2024-01-31 19:27:31 -05:00
TheAimMan 89fc22f28f IMPROVEMENT: Apply core bonus for share and stanek (#913) 2023-12-07 20:10:21 -05:00
TheAimMan 5d266e01a6 Fix rm on .cct files (#880) 2023-10-23 05:19:49 -04:00
Snarling a4b826683e TYPESAFETY: Strict internal typing for AugmentationName (#608) 2023-06-16 17:52:42 -04:00
Snarling 6732549196 ENUMS: Initial Enum Helper rework + Reorganization (#596) 2023-06-12 00:34:20 -04:00
omuretsu b65bd62345 More hotfixes...
* Script editor theme could be corrupted leading to a recovery screen, this should fix that.
* Because script filepath changes were moved before the detection of .ns files, a check was added for .ns files in BaseServer so they get the better name.
2023-05-30 20:00:43 -04:00
David Walker e51527aa86 BUGFIX: More savegame loading fixes (#543)
* Fix loading issues back to pre-1.0
* Be more robust about issues with files not being maps
* Avoid non-fatal error when there's no LastExportBonus
2023-05-29 07:10:26 -04:00
omuretsu 40babcb2ee more hotfixing
Hotfixed usage tips for alias
Hotfixed prestigeHomeComputer to avoid crashing prestige
Added checking at startWorkerScript to try and find instances where script is launched on wrong server
Fixed corp issue with multibuy not providing multibenefits
2023-05-26 14:59:42 -04:00
Snarling ebae35b1fb CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00