Commit Graph

382 Commits

Author SHA1 Message Date
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
LJ
ddb10f833c
TERMINAL: Add --ram-override flag to the run command (#1055)
* Add --ram-override flag to run command
* Update help command
* Fix whitespace
* Update run usage message
* Update autocomplete for run command
* Format
2024-02-15 05:51:37 -08:00
LJ
dc7c9bb065
BUGFIX: Attach hostname to script links in ls command (#1062)
fixes #1051

* Add hostname to script editor page options
* Add hostname option to script editor page
* Attach hostname to script links in ls
* Fix script editor page option type
2024-02-15 05:39:50 -08:00
Caldwell
4d551915b3
MISC: move server constants into their own constant (#1075) 2024-02-10 04:13:42 -05:00
Snarling
0ded11af53
TERMINAL: Fix inconsistent / janky scrolling behavior (#1063) 2024-01-31 19:32:42 -05:00
LJ
a433c8284c
NETSCRIPT: Add .script deprecation notice & migration guide (#1007) 2024-01-07 08:15:24 -05:00
catloversg
4db4b77954
Change import declaration of arg library (#962) 2023-12-28 02:00:12 -05:00
Sphyxis
21c7f56d23
TERMINAL: Updated Alias/Unalias (#914) 2023-12-07 20:15:55 -05:00
draughtnyan
b46b6e62bc
Fix script autocompletion bug w/ subdirectories (#947) 2023-12-04 14:39:08 -05:00
François Gannaz
87e2f5c23b
TERMINAL: Fix autocompletion when running scripts with the "./" command (#900) 2023-10-30 12:32:11 -04:00
Caldwell
269a74d5c0
CODEBASE: update dependencies (#852) 2023-10-07 18:52:48 -04:00
Noah Harris
7b2e8e5312
UI: clear search suggestions on clearall modification (#787) 2023-09-12 02:00:20 -04:00
Michael Ficocelli
7b05bed0d4
FIX: update white-space style to function on electron app (#745) 2023-08-23 17:11:27 -04:00
Michael Ficocelli
86b0bd5ac7
TERMINAL: Add option for partial history search (#736) 2023-08-21 06:50:17 -04:00
omuretsu
fb542a596c Fix scan-analyze box drawing
Non-matching up-and-right character made some fonts display scan-analyze oddly.
2023-07-13 08:12:16 -04:00
hydroflame
1a8b9a96ec
Documentation added ingame (#667) 2023-07-12 17:10:52 -04:00
Aleksei Bezrodnov
1d5a735941
MISC: enforce eslint react checks (#640) 2023-06-26 22:29:44 -04:00
Aleksei Bezrodnov
1af01401d9
UI: Correct behavior of "back" button on faction augs page
Plus router refactoring
2023-06-26 04:24:37 -04:00
Aleksei Bezrodnov
08e3afd125
FIX: show ram calculation error reason to player (#627) 2023-06-19 03:49:32 -04:00
Snarling
a4b826683e
TYPESAFETY: Strict internal typing for AugmentationName (#608) 2023-06-16 17:52:42 -04:00
rqzcho
2537ded3c2
TERMINAL: Allow new lines in terminal when empty (#605) 2023-06-13 14:04:21 -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
bezrodnov
606b4bee95
UI: Prevent terminal scroll on progress bar update (fix #94) (#544) 2023-05-29 14:59:17 -04:00
Snarling
5f2a1c3f27 TERMINAL: Fix original alias syntax (#545) 2023-05-29 06:54:51 -04:00
Snarling
8e4492685d Fix scan analyze display (#539) 2023-05-27 19:30:24 -04:00
omuretsu
ab207ce36c Fix more terminal usage error text 2023-05-26 15:45:49 -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
omuretsu
912fc98d3a Fix ls clickable links in directory 2023-05-26 12:09:59 -04:00
omuretsu
0d55b957f1 Small cat fix
cat no longer shows error message for no file found when a message or literature file was found
2023-05-22 01:52:01 -04:00
Aloït R
8dad2e746f
Fix missing bracket (#519) 2023-05-21 10:07:29 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -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
f81297dcd6
ls display is responsive (#492) 2023-04-26 15:18:26 -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
omuretsu
9004b12256 Actually fix quoted string args 2023-04-24 13:21:58 -04:00
omuretsu
c4776753f1 Fix quoted section detection 2023-04-24 13:05:50 -04:00
omuretsu
3106c03b5b Fix broken run command 2023-04-24 12:54:09 -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
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
Snarling
6290ce562a
Prevent errors thrown from terminal (#443)
At least from getFilepath function
2023-03-23 12:01:58 -04:00
omuretsu
b9ffb9e42e Add triggers for faction invite check
Manually check for faction invites whenever a server is backdoored, and whenever the player uses ns.singularity.checkFactionInvites
2023-03-07 19:31:54 -05:00
Snarling
759f86d6e5
NETSCRIPT: Rework script ram updates (#408) 2023-03-05 22:39:42 -05:00
LiamGeorge1999
b1af58d6a6
Fixed speechmarks not making numeric terminal arguments into strings (#391) 2023-02-25 08:17:01 -05:00
Snarling
d3f9554a6e
2.2.2 Release (#378) 2023-02-21 09:44:18 -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
6a6043c509
CODEBASE: Add custom useRerender hook (#359) 2023-02-11 13:22:55 -05:00
Snarling
b4074328ec
UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
omuretsu
0ec4ef31ab 2.2 2023-01-02 13:20:25 -05:00