Commit Graph

386 Commits

Author SHA1 Message Date
Snarling
bba9317ef6 incorporate read changes 2022-08-24 18:42:42 -04:00
Snarling
4d47785f28 Fix ns documentation for scp and write 2022-08-23 22:06:05 -04:00
hydroflame
849046df3a
Merge pull request #3985 from Snarling/synchronize
NETSCRIPT: ns.scp and ns.write are now synchronous + fix exec race condition
2022-08-23 12:25:24 -03:00
hydroflame
ed76c5e15d
Merge pull request #4019 from MageKing17/patch-4
API: All the player sub-objects need to be copied for `getPlayer`.
2022-08-23 12:07:34 -03:00
MageKing17
80aafc7d48
All the player sub-objects need to be copied.
Not just `mults`. Also, `hacking_chance_mult` still being at the base level appears to be a mistake.
2022-08-21 12:22:58 -07:00
Snarling
823cdf70ca Fix compile race conditions 2022-08-19 18:21:31 -04:00
Roman Ivaniuk
5c0c130b4b 3992 Fix: handle null duration in toast ns function
extend SnackbarEvents typing to allow null in third argument
also remove typos in Electron.tsx init functions comments
2022-08-19 14:38:46 +03:00
Snarling
07e9cb9277 refactor scp function 2022-08-17 20:31:26 -04:00
Snarling
f6a8d5d337 synchronize scp and write 2022-08-17 18:55:12 -04:00
Snarling
95a1c18139 synchronize write and scp 2022-08-17 17:11:59 -04:00
Snarling
b433c366d7 performance update 2022-08-09 19:10:55 -04:00
Snarling
c6cb4ca033 Type correctness 2022-08-09 19:02:33 -04:00
Snarling
648b7e84bf Some cleanup 2022-08-09 18:09:26 -04:00
Snarling
931ea730a5 Move entire ns object to top-level 2022-08-09 18:09:26 -04:00
Snarling
01e63b10a1 move ctx.log to NetscriptHelpers 2022-08-09 18:09:26 -04:00
Snarling
208495e269 Initial commit 2022-08-09 18:09:24 -04:00
Snarling
3a2e676c9b Move error functionality to new wrapper 2022-08-09 18:09:24 -04:00
Olivier Gagnon
07c7f0641a allbuild commit c8440ef2 2022-07-28 14:35:55 -04:00
Olivier Gagnon
315b2adf30 Make invalid hostname better 2022-07-27 00:59:43 -04:00
Olivier Gagnon
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -04:00
Olivier Gagnon
faa3e212f3 fix a bunch of small v2 related bugs 2022-07-26 08:08:51 -04:00
Olivier Gagnon
631d6ef04a fix few bugs 2022-07-21 18:27:23 -04:00
Olivier Gagnon
43b8cfec5c fix test suite 2022-07-21 02:13:47 -04:00
Olivier Gagnon
d01fd55bde lint fmt 2022-07-21 01:58:47 -04:00
Olivier Gagnon
ec17cfdaf3 merge corp not async 2022-07-20 17:27:11 -04:00
Olivier Gagnon
94aa547459 more api break sad 2022-07-20 15:14:26 -04:00
Olivier Gagnon
e0a24cf381 fix args not beign passed to scripts 2022-07-20 11:34:49 -04:00
Olivier Gagnon
28b9c821d2 fix few as any 2022-07-20 02:36:21 -04:00
Olivier Gagnon
49f6fda1e4 remove last colon any for now 2022-07-20 01:48:54 -04:00
Olivier Gagnon
ceb9fa1249 fix more any 2022-07-20 01:13:06 -04:00
Olivier Gagnon
30291f7899 build fix for player in formulas 2022-07-19 23:05:46 -04:00
Olivier Gagnon
70d5390e4d most anys in NetFunc 2022-07-19 19:04:06 -04:00
Olivier Gagnon
c3a10d5d95 fix more anys 2022-07-19 18:25:06 -04:00
Olivier Gagnon
2442402af5 fix more anys 2022-07-19 16:46:03 -04:00
Olivier Gagnon
bb8af88b77 prep v2 2022-07-19 14:21:12 -04:00
Olivier Gagnon
4bee746576 rm any 2022-07-15 01:51:30 -04:00
Olivier Gagnon
5629c16def extract multipliers in its own type 2022-07-14 18:43:33 -04:00
Olivier Gagnon
fac6633347 remove so many fields and values used by the old system 2022-07-12 23:13:40 -04:00
Olivier Gagnon
f7805c4a51 convert faction work to new work system 2022-07-12 01:54:19 -04:00
Olivier Gagnon
606f1bf6c4 create program and grafting done 2022-07-10 01:37:36 -04:00
Olivier Gagnon
647392626e convert taking class ot new work system 2022-07-07 17:28:23 -04:00
Olivier Gagnon
3ee7d593d0 Convert crime to new work model 2022-07-07 02:00:23 -04:00
Staszek Welsh
02b07bb332 Fix relevant linter errors and run formatter 2022-06-02 22:54:50 +01:00
Olivier Gagnon
00adc2ffa2 allbuild commit ddf4ab26 2022-05-26 00:34:30 -04:00
hydroflame
bef953bf59
Merge pull request #3758 from danielyxie/api-wrap
Fix a few bugs related to api wrapping
2022-05-25 11:12:38 -04:00
Olivier Gagnon
4dd7afac9d allbuild commit 252b0a30 2022-05-25 11:10:25 -04:00
phyzical
bec40e5274
fix compliation error in dev
bugfix/fix-dev-build

File List:
src/NetscriptFunctions.ts
2022-05-25 17:20:32 +08:00
hydroflame
31fe43715e
Merge pull request #3743 from fdellwing/patch-1
MISC: Fix #3742 manualHack() should use correct BitNode Multiplier
2022-05-24 20:22:01 -04:00
Olivier Gagnon
972abcbdc8 Wrap all the API 2022-05-24 20:16:39 -04:00
Olivier Gagnon
ae38b11ede made static ram cost typecheck that it's missing no property. 2022-05-24 18:34:00 -04:00
Olivier Gagnon
0da2e74d12 more work on wrapping formulas 2022-05-24 17:51:48 -04:00
Fabian Dellwing
4d41d2deaf
Fix #3742 2022-05-24 18:28:10 +02:00
hydroflame
b80e2d5fd1
Merge branch 'dev' into wrap-api 2022-05-19 01:37:06 -04:00
Undeemiss
b3aa0578fb Minor refactor 2022-05-17 15:54:05 -05:00
Undeemiss
c01cf85d27 Formatted and linted 2022-05-17 15:25:27 -05:00
Undeemiss
8903cd2a8b Removed closePid(fn, host, ...args) and fixed closePid(pid) 2022-05-17 15:19:35 -05:00
Undeemiss
e17fe6f618 closeTail(fn, host, ...args) can now close dead script tails
closeTail(pid) still cannot
2022-05-17 14:46:30 -05:00
Undeemiss
2b9d408b55 First attempt at an implementation; requires script be running 2022-05-17 13:45:30 -05:00
Undeemiss
5526355a43 Set up the skeleton of an ns.closeTail function 2022-05-16 19:15:38 -05:00
Olivier Gagnon
c6806caca2 Wrap most of the API 2022-05-07 19:08:07 -04:00
Zoë Hoekstra
5dee4980e0
Add safeguard toggle to ns.killall() 2022-05-04 17:11:08 +02:00
Olivier Gagnon
f6e5f719d1 infiltration API fixes. 2022-04-22 17:12:14 -04:00
Olivier Gagnon
9fdfb77dd4 Update infiltrators 2022-04-22 15:30:49 -04:00
phyzical
8e1300d69d Merge branch 'dev' into feature/add-infiltration-faction
# Conflicts:
#	src/Netscript/RamCostGenerator.ts
2022-04-20 20:10:05 +08:00
JP Sugarbroad
01d7ac6967 make jQuery use explicit 2022-04-19 16:14:16 -07:00
phyzical
9c23fc89d1 merge base 2022-04-14 21:27:08 +08:00
Olivier Gagnon
62d15ff3a1 rm SourceFileFlags 2022-04-14 01:22:50 -04:00
Chris380
99923e0f62
Update src/NetscriptFunctions.ts
Co-authored-by: Nikolai Korolev <CrafterKolyan@mail.ru>
2022-04-13 15:58:43 +02:00
chris380
1dac3fea31 fixed formatting + import 2022-04-13 15:54:48 +02:00
Chris380
e0f4ec6594
Update src/NetscriptFunctions.ts
Co-authored-by: Nikolai Korolev <CrafterKolyan@mail.ru>
2022-04-13 15:47:31 +02:00
phyzical
90d1c22aca changes all references to "heath reduction to damage reduction" 2022-04-13 18:54:13 +08:00
phyzical
6b48ff8f21 merge base 2022-04-13 18:50:42 +08:00
chris380
44c71347d7 formatting 2022-04-13 09:22:46 +02:00
chris380
355d2bd8f9 use minimum of given and maximum threads 2022-04-13 09:19:09 +02:00
chris380
4c113c19eb take into account max threads needed 2022-04-13 09:16:59 +02:00
Olivier Gagnon
e1a56f9270 typos 2022-04-13 02:04:51 -04:00
Heinous Tugboat
492c7012ea Renames SnackbarVariant to ToastVariant, adds enum to ns 2022-04-13 01:54:13 -04:00
hydroflame
eee8d3e283
Merge pull request #3381 from HeinousTugboat/htugboat/toast-enum
Adds SnackbarVariant enum
2022-04-13 00:34:09 -04:00
hydroflame
c8c271a334
Merge pull request #3401 from TheMas3212/feat/wrap-singularity
Wrap Singularity API with wrapper
2022-04-12 20:53:55 -04:00
Olivier Gagnon
52e01fc026 fix a few things about getRecentScritps 2022-04-12 14:45:48 -04:00
hydroflame
68abd27d2c
Merge branch 'dev' into add-ns-getRecentScripts 2022-04-12 14:21:18 -04:00
Olivier Gagnon
864816bd22 fix unknown 2022-04-12 13:37:19 -04:00
chris380
fa29d2d9a8 take into account max thread needed 2022-04-12 17:42:49 +02:00
TheMas3212
b2689eaa5a
Wrap Singularity API with wrapper
also refactored the RamCosts IMap as it didnt quite work properly due to
how the wrapper calculates function names
2022-04-12 16:51:10 +10:00
Heinous Tugboat
5b96cedd0c Adds SnackbarVariant enum 2022-04-08 23:46:19 -04:00
phyzical
c70f59ac54 merge dev 2022-04-07 16:27:23 +08:00
TheMas3212
f0cfc8700a run formater 2022-04-07 10:23:52 +10:00
TheMas3212
ea2b444b87 Initial API Wrapper Work
onlying wrapping Stanek api currently as test sample
(Rebased onto upstream/dev)
2022-04-07 10:23:46 +10:00
hydroflame
b6d68f7353
Merge branch 'dev' into bugfix/fix-tests 2022-04-06 20:16:51 -04:00
Olivier Gagnon
f05b533af5 fix a few test 2022-04-06 20:08:03 -04:00
Olivier Gagnon
724c0669da sleep/asleep return promise true 2022-04-06 19:38:30 -04:00
phyzical
18af3f8413 moved updateRam to first call to avoid lack of mocks for tests
* added wrapper funcs to simplify updateRam
* added static parser tests and skiped what isnt worker still for next person to try and fix
2022-03-31 21:41:19 +08:00
Jack
e11819f0fd
Merge branch 'dev' into feature/add-infiltration-faction 2022-03-31 08:09:00 +08:00
Olivier Gagnon
4b8791e329 Fix toast 2022-03-30 18:59:30 -04:00
Olivier Gagnon
b0281154fe fix getScriptLogs 2022-03-30 15:29:25 -04:00
Olivier Gagnon
8812451a32 allbuild commit 432c8dd2 2022-03-30 14:14:47 -04:00
Olivier Gagnon
432c8dd206 Fix isRunning 2022-03-30 14:11:21 -04:00
Olivier Gagnon
2985cf1cec fix rm 2022-03-30 13:44:24 -04:00
Olivier Gagnon
3458b57c7d fix tail 2022-03-30 13:37:10 -04:00
Olivier Gagnon
fdcd13c312 fix getRunnignScript 2022-03-30 13:33:04 -04:00
Olivier Gagnon
f8e050ba26 allbuild commit f4a58ff5 2022-03-30 13:16:14 -04:00
Olivier Gagnon
98ae97afea Validate city name coming from netscript 2022-03-30 11:34:03 -04:00
phyzical
be24562d34 merge dev 2022-03-30 19:11:34 +08:00
phyzical
07c6051004 merge dev 2022-03-30 19:00:57 +08:00
Olivier Gagnon
12d5f55aec unknown-ify the rest of the basic API. 2022-03-29 22:14:56 -04:00
Olivier Gagnon
aa0425a23d unknown-ify half the basic API. 2022-03-29 21:42:27 -04:00
Olivier Gagnon
a6e256ad5a Step 1 of moving singularity functions 2022-03-29 17:48:45 -04:00
Olivier Gagnon
680081c548 post-grafting changes 2022-03-29 14:09:17 -04:00
phyzical
7c5097ee83 added ns functions
* refactored out logic to be reused by api
2022-03-27 15:53:13 +08:00
phyzical
7f28158005 moved over to player stats
* added new augmentations
2022-03-27 12:26:43 +08:00
nickofolas
3476f0f0eb Grafting API (no RAM costs yet) 2022-03-23 12:35:15 -05:00
hydroflame
e56f7356cd
Merge pull request #2883 from chrisrabe/fix/hackanalyzethreads-infinity
fix: fixed hackAnalyzeThreads returning infinity
2022-03-20 22:23:15 -04:00
Master-Guy
91841836c9
One more IP reference 2022-03-19 17:35:55 +01:00
hydroflame
83ef5a940b
Merge branch 'dev' into prompt-additions 2022-03-17 15:38:13 -04:00
Olivier Gagnon
28bd5e1b30 convert more user facing functions to unknown 2022-03-16 19:50:56 -04:00
Olivier Gagnon
989d0709ed unknown-ify some code 2022-03-16 19:33:45 -04:00
hydroflame
5865f8a1ea
Merge pull request #3082 from CrafterKolyan/patch-3
Fix Static Ram Circumventing for all NS functions
2022-03-16 14:58:00 -04:00
phyzical
3cbb926fd8 expose the inBladeburner on the player object 2022-03-12 12:36:47 +08:00
hydroflame
31a26a31ad
Merge pull request #3055 from ApamNapat/simplified_some_boolean_logic
Simplified some booleans and if elses
2022-03-10 22:11:26 -05:00
hydroflame
9d080c9901
Merge pull request #2934 from phyzical/bugfix/1955
added check for NS interface with user defined guard
2022-03-10 21:44:37 -05:00
Nikolai Korolev
20e3924c6a
Merge branch 'dev' into patch-3 2022-03-10 12:06:19 +03:00
BB
0eced1b9f2 Simplified some booleans and if elses 2022-03-08 22:52:26 +01:00
hydroflame
570b8caf78
Merge pull request #2873 from SagePtr/purchaseserver-args
Add user-friendly invalid argument number message to purchaseServer
2022-03-08 16:39:54 -05:00
Nikolai Korolev
25e28df42b
Fix Static Ram Circumventing for all NS functions 2022-03-07 16:18:58 +03:00
Nikolai Korolev
b2ec5d1691
Fix error message for scp 2022-03-07 11:40:06 +03:00
hydroflame
f11e7bac6a
Merge pull request #3005 from rhobes/patch-1
Fix https://github.com/danielyxie/bitburner/issues/2996: weakenAnalyze miscalculation
2022-03-01 11:16:31 -05:00
Heikki Aitakangas
66ceff4e33 Fix #3037: wrap user-supplied atExit function so that we can't accidentally leak game objects as 'this' 2022-02-26 01:00:02 +02:00
M
6d87d7b743
Fix https://github.com/danielyxie/bitburner/issues/2996
Trivial fix of https://github.com/danielyxie/bitburner/issues/2996 by adding the BN multiplier to analyze.
2022-02-19 14:21:39 -08:00
phyzical
66ec3f4964 fix function name in error for better trace 2022-02-13 17:10:11 +08:00
phyzical
9770853e29 removed the isNs interface guard as its redunant 2022-02-13 17:08:55 +08:00
phyzical
e8954bc1ee added basic type check to tryWritePort 2022-02-07 22:14:48 +08:00
phyzical
6ed5a445a8 added check for NS interface with user defined guard 2022-02-07 21:56:04 +08:00
Chris Rabe
3e61780fad fix: fixed hackAnalyzeThreads returning infinity 2022-01-31 08:14:10 +10:00
Phil
08d0b4cbae Adding support for text/select options in Prompt command 2022-01-30 14:06:18 +00:00
SagePtr
db5476ebd0 Add user-friendly invalid argument number message to purchaseServer 2022-01-30 00:04:45 +02:00
smolgumball
2add4e9112 Merge branch 'dev' into add-ns-getRecentScripts 2022-01-26 19:07:02 -07:00
hydroflame
1a34d5e363
Merge pull request #2703 from lethern/patch-1
purchaseServer error message fix + small docs change
2022-01-26 00:50:42 -05:00
Terrana
f2c4109211
Add ns.printf function
Behaviour is consistent with that of tprintf versus tprint and
should be equivalent to ns.print(ns.sprintf(...))
2022-01-21 12:08:47 +00:00
lethern
61cea12ca2
purchaseServer: improved error message for ram > maxRam 2022-01-19 19:09:33 +01:00
smolgumball
74e2acfa6f Add ns.getRecentScripts() 2022-01-19 00:04:48 -07:00
Olivier Gagnon
d2ec38753b Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2022-01-18 18:59:17 -05:00
Olivier Gagnon
d0a44a6088 change asleep 2022-01-18 18:57:43 -05:00
hydroflame
bb34d6b582
Merge pull request #2618 from pigalot/Corp-Api-Updates
Corp api updates
2022-01-18 18:05:23 -05:00
Olivier Gagnon
05cbc25a8f 1.4 2022-01-18 14:03:24 -05:00
lethern
bb6c2cd79e
Update NetscriptFunctions.ts 2022-01-17 23:53:44 +01:00
hydroflame
27a54217eb
Merge pull request #2653 from nickofolas/fix/refactor-loops
Refactor `for ... in` loops
2022-01-17 16:01:04 -05:00
pigalot
360b8d8d16 Add has corp to the api player object 2022-01-16 16:11:31 +00:00
nickofolas
ab841f7530 Refactor for ... in loops 2022-01-15 18:45:03 -06:00
hydroflame
c0f6399a96
Merge pull request #2590 from deathly809/feature/ns_support_rm
Add support for the mv command in NS
2022-01-15 18:26:31 -05:00
hydroflame
0b36c9a4b2
Merge pull request #2648 from SlyCedix/scp-def
Add function signature for scp(files, destination)
2022-01-15 18:23:56 -05:00