Commit Graph

385 Commits

Author SHA1 Message Date
Snarling
006fbd528f
DOCS: Add printRaw and tprintRaw docs (#663) 2023-07-07 18:23:26 -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
Snarling
40b89baca1
MISC: Various small fixes (#574)
* ns.ls filter can include leading slash in filename
* scp from terminal accepts multiple filenames
* terminal displays root / instead of ~ as base
* cd with no args returns to root
2023-06-06 08:46:07 -04:00
omuretsu
72a631d4ed Another lint fix 2023-05-27 08:46:28 -04:00
omuretsu
8bf13b6fd3 fileExists no longer case sensitive for programs 2023-05-27 08:39:29 -04:00
David Walker
4503da6226
UI: LogBox overhaul (#508) 2023-05-26 08:07:37 -04:00
G4mingJon4s
113af6e711
Add ns.getFunctionRamCost (#526) 2023-05-26 07:46:08 -04:00
omuretsu
396e71955e Fix scp logs
Hostname was not being displayed correctly
2023-05-26 04:04:17 -04:00
omuretsu
f4655b8e1b Typo fix 2023-05-15 23:12:17 -04:00
Snarling
2ae3ac52f1
CORPORATION: Corp changes prior to 2.3 finalization (#503) 2023-05-15 18:06:57 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
Snarling
e1aff1a315 Lint fix 2023-04-28 11:49:05 -04:00
Snarling
350679bc83 Program path bugfix + wget use contentFile 2023-04-28 11:42:35 -04:00
Snarling
8fd4eee8e9 Fix wget with text file target 2023-04-28 11:14:29 -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
6024c81113
NETSCRIPT: add ns.getResetInfo(#490)
* Move lastAugReset and lastNodeReset back to main API under getResetInfo, also included currentNode.
* The associated properties are deprecated on getPlayer()
2023-04-25 05:22:36 -04:00
Snarling
62adaf3006
Various bugfix/cleanup (#489)
* parseCommands no longer removes excess whitespace (it was unneeded and also had a bug in it relating to commands that ended in a quote mark)
* more documentation and some variable renaming
* Fix script editor focus bug on navigating to the editor from sidebar
* Fix initialization for lastNodeReset and lastAugReset
2023-04-24 15:48:49 -04:00
David Walker
b3c0027b66
NETSCRIPT: Change error return of hackAnalyzeThreads (#482)
Fixes #102
2023-04-24 11:04:19 -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
6f56f35943
Add deprecation messages (#486)
Add back getPlayer().playtimeSinceLastX, but with deprecation messages applied
2023-04-24 10:21:43 -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
c44bdc1018 Remove unreachable code 2023-04-12 21:05:53 -04:00
G4mingJon4s
d01ba91654
SINGULARITY: Added aug and node identifiers (timestamps of last resets) (#472) 2023-04-12 13:13:42 -04:00
Snarling
f761eed377
NETSCRIPT: Type correctness for getServer (#476) 2023-04-11 15:12:55 -04:00
David Walker
ed9e6d5ea3
NETSCRIPT: Compiled modules will be even more shared (#468) 2023-04-07 21:08:39 -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
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
Zelow79
eb8bcd00e3
NETSCRIPT: reduce RAM cost for renamePurchasedServer to 0 (#450) 2023-03-28 16:01:09 -04:00
Snarling
dadf42bfe8
Fix hackAnalyzeThreads again
But actually this time
2023-03-26 02:56:01 -04:00
David Walker
9353129e84
BUGFIX: Fix the return of weaken() to account for BN mult (#448) 2023-03-26 02:16:51 -04:00
David Walker
98f7f473b4
NETSCRIPT: Add "temporary" as a RunOption to run/exec/spawn (#432) 2023-03-21 18:54:49 -04:00
omuretsu
c2cd5845b2 Refactor ls 2023-03-07 08:04:08 -05:00
Snarling
759f86d6e5
NETSCRIPT: Rework script ram updates (#408) 2023-03-05 22:39:42 -05:00
omuretsu
75481aa195 Fix growthAnalyzeSecurity doc
Also a format fix from a previous sloppy commit
2023-02-28 09:57:02 -05:00
omuretsu
45ca94b1dc Fix hackAnalyzeThreads
It was previously returning infinity any time a single thread was calculated to hack less than $1, due to an improper use of Math.floor.
2023-02-28 09:02:14 -05:00
lucebac
ae92ea0f94
ns.scp: strip leading slashes from filenames if file is in root (#263) 2023-02-28 06:53:42 -05:00
T.J. Eckman
33f0150d25
BUGFIX: Memory Leak in NetscriptPorts (#399)
Co-authored-by: Snarling <84951833+Snarling@users.noreply.github.com>
2023-02-27 19:54:04 -05:00
omuretsu
6b8ae1b351 Change high% display to mult form
Also includes some documentation updates from a previous PR (sleeve.setToIdle)
2023-02-19 15:24:27 -05:00
Mughur
2bd5741b22
Merge pull request #371 from d0sboots/hacking
NETSCRIPT: Add `additionalMsec` to BasicHGWOptions
2023-02-19 07:42:11 +02:00
omuretsu
bd4fe19fde Fix percent display at large values 2023-02-18 08:03:16 -05:00
David Walker
53755dd573 NETSCRIPT: Add additionalMsec to BasicHGWOptions
This option adds additional time to the sleep in hack/grow/weaken before
the command takes effect. The critical difference between this and doing
your own sleep is that it creates a single, uninterruptible sleep: This
opens up multiple new avenues of gameplay for batching.

Note that use of this new feature is theoretically always suboptimal,
since extending the sleep time wastes RAM.
2023-02-17 00:01:41 -08:00
David Walker
ed59f4bfe7
NETSCRIPT: Add growThreads to formulas, improve docs for hacking functions (#330) 2023-02-14 17:38:51 -05:00
Snarling
08e71c732b
Threads are a positive integer (#366)
* Added new positive integer ns validation helper
* `run`, `exec`, and `spawn` verify threads as a positive integer.
* `run` terminal command also fails if the provided threadcount is not a positive integer.
* Removed some references to .script files in various documentation, and removed some of the NS1 example blocks
2023-02-14 01:32:01 -05:00
Snarling
b0bdf0c7ad
DOC: Improve ns.kill documentation (#365) 2023-02-13 21:50:38 -05:00
Snarling
b4074328ec
UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
David Walker
4eef9eec03
NETSCRIPT: More ns Proxy changes (#297) 2023-01-05 20:41:24 -05:00
David Walker
7b5080a42b
NETSCRIPT: Add undocumented function printRaw() (#277)
This is analagous to tprintRaw (enabled by ns.iKnowWhatImDoing()), but
for logs instead of the terminal. This provides a supported* method of
creating complicated UIs for scripts.

*No actual support, expressed or implied, is provided for use of this
function.
2023-01-05 20:30:34 -05:00
Snarling
31bf0c43d1 v2.2.1 (#293)
* 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
2023-01-04 09:45:17 -05:00
David Walker
5f18b87323
New ns implementation using Proxy (#292) 2023-01-04 08:56:29 -05:00