Commit Graph

184 Commits

Author SHA1 Message Date
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
Snarling d25254caf1 BUGFIX: Prevent crash that could occur with server named runningScripts (#502) 2023-05-03 20:19:56 -04:00
David Walker ad5a1c4bac NETSCRIPT: Revert FormattedCode type (#500) 2023-05-03 07:13:35 -04:00
David Walker aa7facd4ba NETSCRIPT: Greatly speed up script launching, and remove the limitation unique args per script (#440)
* Remove the limitation unique args per script
* Internal changes to how runningScripts are stored on the server, to make common usage faster.
2023-04-27 18:21:06 -04:00
Snarling e0272ad4af FILES: Path rework & typesafety (#479)
* 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).
2023-04-24 10:26:57 -04:00
Snarling 0df984eea0 CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473) 2023-04-18 03:19:45 -04:00
Snarling f761eed377 NETSCRIPT: Type correctness for getServer (#476) 2023-04-11 15:12:55 -04:00
Snarling a6dfdff3ba Fix build issue 2023-04-07 02:45:19 -04:00
Snarling 04d49e3a6d SCRIPTS: Script modules are reused when they are imported (#461)
Also corrects some compile race conditions.
2023-04-07 00:33:51 -04:00
David Walker 8445af5f2b Moved Player initialization point (#452)
Now initialized as side effect in PlayerObject, instead of in Player file that is imported everywhere.
2023-03-29 00:30:27 -04:00
omuretsu 798da75d83 renameServer changes
* Update doc error, regenerate docs
* Update a bad error message in renamePurchasedServer@serverPurchases.ts
* restore true/false return (removed in #450 due to miscommunication)
2023-03-28 16:10:24 -04:00
Snarling a774592e64 fix crash when renaming server while connected to that server (#438) 2023-03-21 21:21:15 -04:00
David Walker 98f7f473b4 NETSCRIPT: Add "temporary" as a RunOption to run/exec/spawn (#432) 2023-03-21 18:54:49 -04:00
David Walker c77b89d4d9 PERFORMANCE: Improve speed of saving when there are lots of scripts (#430) 2023-03-17 23:59:27 -04:00