mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 22:38:34 +02:00
Compare commits
288 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d8e1a6d24 | ||
|
|
e76e254c3e | ||
|
|
ab80ee66c8 | ||
|
|
f25756916a | ||
|
|
7b3265346d | ||
|
|
9a2bb16548 | ||
|
|
ba7d45362f | ||
|
|
995294a770 | ||
|
|
a0fc9cc713 | ||
|
|
a354867fc4 | ||
|
|
b8f03cb50b | ||
|
|
abcd6c545a | ||
|
|
ebf08d5d1f | ||
|
|
8b3206e1c6 | ||
|
|
d9efea0fe6 | ||
|
|
70383d9085 | ||
|
|
16b9ad21ea | ||
|
|
e782b6fd7c | ||
|
|
e64247571d | ||
|
|
7b3cf48453 | ||
|
|
481938a2fb | ||
|
|
463d4cdb1d | ||
|
|
cf48d666f5 | ||
|
|
30a6419b11 | ||
|
|
304a918cc9 | ||
|
|
eeab6df718 | ||
|
|
fe3e8fb348 | ||
|
|
d9e8161a64 | ||
|
|
653d531d0a | ||
|
|
bd5c502f53 | ||
|
|
5f6a5c8785 | ||
|
|
7321d64383 | ||
|
|
2316bf5b69 | ||
|
|
c42d4143c9 | ||
|
|
18ae6ce215 | ||
|
|
101914b660 | ||
|
|
3afafe4454 | ||
|
|
cb92643c7e | ||
|
|
e622b9b904 | ||
|
|
d9f04203cf | ||
|
|
2f7950b49c | ||
|
|
1f08724fea | ||
|
|
a28bb4bd99 | ||
|
|
f40d4f8e92 | ||
|
|
76ce2f9955 | ||
|
|
2ee548a140 | ||
|
|
54d099e552 | ||
|
|
bd6585617c | ||
|
|
f439352438 | ||
|
|
c2a56a6150 | ||
|
|
b8d3109158 | ||
|
|
bed66f980f | ||
|
|
e674a177d6 | ||
|
|
53f187fb89 | ||
|
|
ee4471e22c | ||
|
|
4b5e0b1f6a | ||
|
|
bf5c43daa2 | ||
|
|
30cdaa1a7a | ||
|
|
48a7eb364f | ||
|
|
70521c9156 | ||
|
|
efd4152eed | ||
|
|
23445a917d | ||
|
|
8703da4ab6 | ||
|
|
7f8757b536 | ||
|
|
b42f775493 | ||
|
|
30c04f8152 | ||
|
|
81a707123e | ||
|
|
cfa941ce58 | ||
|
|
c82b2e15a0 | ||
|
|
fe14d4fef3 | ||
|
|
08eb60d21b | ||
|
|
7ed64cbc9c | ||
|
|
819e9f3448 | ||
|
|
7bb36ec111 | ||
|
|
fe7e1c86bc | ||
|
|
d2c7b2504c | ||
|
|
175af0bd28 | ||
|
|
8deb907b89 | ||
|
|
36e3dd73ac | ||
|
|
585e089976 | ||
|
|
7a4a973c06 | ||
|
|
1d8a1d5089 | ||
|
|
7113ee5425 | ||
|
|
38d99ff15e | ||
|
|
b7962ad8ab | ||
|
|
ed308b4fa6 | ||
|
|
574c284321 | ||
|
|
9dc3b22919 | ||
|
|
25afecc0ec | ||
|
|
7f5bc5700e | ||
|
|
da6262c856 | ||
|
|
1288d1c289 | ||
|
|
e478b9a224 | ||
|
|
7ee7a79763 | ||
|
|
519b4fef44 | ||
|
|
e23db93c8b | ||
|
|
1b8205e9d5 | ||
|
|
52111f6e07 | ||
|
|
8ebfcdb089 | ||
|
|
19984a6f22 | ||
|
|
b88361921e | ||
|
|
591ad45154 | ||
|
|
b53c35126e | ||
|
|
35c32e2871 | ||
|
|
e55387df4d | ||
|
|
2414949c2c | ||
|
|
309cd55085 | ||
|
|
8289b23cff | ||
|
|
aef362204d | ||
|
|
bfb9841832 | ||
|
|
6f009679ad | ||
|
|
6a1691fe54 | ||
|
|
bc71b8e18f | ||
|
|
a79d7f9e45 | ||
|
|
478646290e | ||
|
|
5696db2788 | ||
|
|
d4bdb8de2b | ||
|
|
4d3dbf169d | ||
|
|
dc4a85e591 | ||
|
|
de8883ed0f | ||
|
|
3fac471d51 | ||
|
|
0f23c95737 | ||
|
|
f4fcb5cde1 | ||
|
|
e56ed353e5 | ||
|
|
d3b9f32c3f | ||
|
|
384d1c1a2b | ||
|
|
7a1fce6f64 | ||
|
|
eba86e4bf0 | ||
|
|
a3f9a5c21e | ||
|
|
703e7c52ae | ||
|
|
7b993f3550 | ||
|
|
216500ed32 | ||
|
|
dd3975ab1d | ||
|
|
ed59f325ef | ||
|
|
057ccc2a2b | ||
|
|
1ad6f9f310 | ||
|
|
104a97d711 | ||
|
|
be437c83f6 | ||
|
|
7ae309edda | ||
|
|
7ab4ad8174 | ||
|
|
524714601e | ||
|
|
da7f01cca9 | ||
|
|
6c9555ba32 | ||
|
|
6beb6e9f95 | ||
|
|
61274310d6 | ||
|
|
12f9a2b24d | ||
|
|
c467daaf86 | ||
|
|
a923041382 | ||
|
|
ae1ca8f9a6 | ||
|
|
6669c4da6a | ||
|
|
5f1a94a9d3 | ||
|
|
fe87f1f628 | ||
|
|
8553bcb8fc | ||
|
|
75dabd10be | ||
|
|
d8de22a273 | ||
|
|
714c1cc9d6 | ||
|
|
08097aaf09 | ||
|
|
db226ce0b8 | ||
|
|
c5581e92bc | ||
|
|
7c4cd7ef86 | ||
|
|
28a4af0ddc | ||
|
|
0c2a59bb6c | ||
|
|
99f7a4cc7b | ||
|
|
35a34470a2 | ||
|
|
c637d0e4e4 | ||
|
|
803afc5244 | ||
|
|
bbd942ceca | ||
|
|
1e5f7184a2 | ||
|
|
fc8958af83 | ||
|
|
6b9f9ef7fa | ||
|
|
dd4b54406c | ||
|
|
d81358c80f | ||
|
|
6aaeb6b59e | ||
|
|
edf8e24046 | ||
|
|
c0662599b3 | ||
|
|
7ef7b692d0 | ||
|
|
25ac8432fc | ||
|
|
0457081908 | ||
|
|
162310f005 | ||
|
|
c703b71871 | ||
|
|
e9d1ddfaf3 | ||
|
|
4d5401f62e | ||
|
|
de5c1bbf98 | ||
|
|
c93205fec6 | ||
|
|
09c5ec7769 | ||
|
|
33af6685f8 | ||
|
|
d2dd6916b1 | ||
|
|
863ac2c8c0 | ||
|
|
1547581c24 | ||
|
|
1755b7cd7f | ||
|
|
0bf01aacab | ||
|
|
69babf02b2 | ||
|
|
d61e12fdd1 | ||
|
|
4aaf845fca | ||
|
|
4f4c6fe7e5 | ||
|
|
d801743842 | ||
|
|
a5f5c81912 | ||
|
|
65082f677e | ||
|
|
ffc34387f0 | ||
|
|
6a3d22d7bd | ||
|
|
4c7f192645 | ||
|
|
6288eec6d7 | ||
|
|
3d6692b292 | ||
|
|
153dbfff12 | ||
|
|
483d554fc2 | ||
|
|
91105c6d8c | ||
|
|
373ced2efe | ||
|
|
f6871f0911 | ||
|
|
d00fad472e | ||
|
|
b655b7a44e | ||
|
|
1577467fe1 | ||
|
|
ac05135f59 | ||
|
|
47cf5c1610 | ||
|
|
e6755afcb3 | ||
|
|
27a8abbdec | ||
|
|
aba2336093 | ||
|
|
9b483bdd8a | ||
|
|
8c8af38a3a | ||
|
|
93b9a10e41 | ||
|
|
22aec2a8b9 | ||
|
|
ef334cb851 | ||
|
|
c894aba8f5 | ||
|
|
ddb10f833c | ||
|
|
733f2ccb5b | ||
|
|
dc7c9bb065 | ||
|
|
b79df29ef4 | ||
|
|
078f94cbc0 | ||
|
|
0ba337f091 | ||
|
|
fca414e7c9 | ||
|
|
ca374076b8 | ||
|
|
84c4dba1e2 | ||
|
|
fccc27fe58 | ||
|
|
65214c0322 | ||
|
|
903f812424 | ||
|
|
e8311d4f05 | ||
|
|
8c2a23f2ba | ||
|
|
fbc41d0278 | ||
|
|
e966e78b72 | ||
|
|
4d551915b3 | ||
|
|
fd5b0f8241 | ||
|
|
6bd50e6f24 | ||
|
|
9697a82e0c | ||
|
|
187226a30f | ||
|
|
2f2355942f | ||
|
|
330a32e1d0 | ||
|
|
011d5e8fd6 | ||
|
|
5277db2c65 | ||
|
|
497618dc2f | ||
|
|
0ded11af53 | ||
|
|
cf45981cd2 | ||
|
|
55e21d1e19 | ||
|
|
b6b4788845 | ||
|
|
05295598a4 | ||
|
|
cb7c75a3ce | ||
|
|
51ac4d009c | ||
|
|
f79470148e | ||
|
|
788a7549da | ||
|
|
39c5a356b1 | ||
|
|
157ff8ea88 | ||
|
|
d0e66d5be2 | ||
|
|
2ac0470cea | ||
|
|
c5ca30d796 | ||
|
|
63574bca0c | ||
|
|
44f0a77c4e | ||
|
|
87c4cbbc57 | ||
|
|
6f8a59593a | ||
|
|
82511e5030 | ||
|
|
7017f3c2f8 | ||
|
|
f0f335e09a | ||
|
|
a433c8284c | ||
|
|
9827fda4a4 | ||
|
|
dd9ace7891 | ||
|
|
1b03618555 | ||
|
|
68a8427838 | ||
|
|
7e721c144e | ||
|
|
0da9d9d3c0 | ||
|
|
8742df9588 | ||
|
|
4db4b77954 | ||
|
|
1dac133ef4 | ||
|
|
e096456c29 | ||
|
|
eba840dcd3 | ||
|
|
550829a1c3 | ||
|
|
ccf0aa4771 | ||
|
|
e7b68676f5 | ||
|
|
498bb6128a | ||
|
|
a42b72d31a | ||
|
|
489ba595f3 | ||
|
|
7ef12a0323 |
191
.git_blame_ignore_revs
Normal file
191
.git_blame_ignore_revs
Normal file
@@ -0,0 +1,191 @@
|
||||
## What is this?
|
||||
## Some git commits contain mostly prettier/lint changes and aren't as valuable when
|
||||
## using `git blame`. This file contains a list of hashes that identify such commits
|
||||
## in a way that git can use.
|
||||
|
||||
## Tell git to use this file with:
|
||||
## git config --local blame.ignoreRevsFile .git_blame_ignore_revs
|
||||
|
||||
## This file was created by cleaning up and filtering the output of this command line:
|
||||
## git log --grep "[Pp]rettier"
|
||||
|
||||
## All that's really needed here are the actual 40-digit hashes of
|
||||
## the commits. I left the author/date info in as it helped when I
|
||||
## was filtering this list to just formatting changes.
|
||||
|
||||
4c9ca4990450740785a4dc95a75de53aeac724df
|
||||
# Author: omuretsu
|
||||
# Date: Fri Jun 23 10:14:18 2023 -0400
|
||||
|
||||
07b1eefe33b16251e0e67ae3231db2059defb1cc
|
||||
# Author: omuretsu
|
||||
# Date: Tue Feb 7 21:16:18 2023 -0500
|
||||
|
||||
bbe6421b067b0d0b876c42e49dafcbbb6458ef8d
|
||||
# Author: borisflagell
|
||||
# Date: Tue Oct 11 15:33:55 2022 +0300
|
||||
|
||||
ed0a28d29272ba2d5716618b73d231bca1ad79d1
|
||||
# Author: hydroflame
|
||||
# Date: Sun Oct 9 00:22:25 2022 -0400
|
||||
|
||||
a1f90d77ce708efb968d7e7ddb804b9862f2f460
|
||||
# Author: Snarling
|
||||
# Date: Tue Sep 27 19:58:14 2022 -0400
|
||||
|
||||
6be884a9ad42e9920be233302a066dea01766c8e
|
||||
# Author: borisflagell
|
||||
# Date: Sat May 28 01:15:05 2022 +0200
|
||||
|
||||
51ba358464ce5787ef472531e0bdb2b6b239955e
|
||||
# Author: Markus-D-M
|
||||
# Date: Wed May 25 21:27:58 2022 +0200
|
||||
|
||||
9091441389182a261438ec16ea17edcf11ab6f39
|
||||
# Author: borisflagell
|
||||
# Date: Mon May 23 19:43:46 2022 +0200
|
||||
|
||||
5bc1d293ca14f717d967ff4a345fe1ace1ffdd4c
|
||||
# Author: borisflagell
|
||||
# Date: Sun May 22 11:59:14 2022 +0200
|
||||
|
||||
d44d71712f066518321cefed18e145141ea23818
|
||||
# Author: borisflagell
|
||||
# Date: Sun May 22 06:40:32 2022 +0200
|
||||
|
||||
bd2d5396a60f31c1bd9837786fb10586cbcc6eda
|
||||
# Author: phyzical
|
||||
# Date: Thu Apr 28 19:22:37 2022 +0800
|
||||
|
||||
ad4c84be937224297f6745b6df3d433466b047c1
|
||||
# Author: borisflagell
|
||||
# Date: Sat Apr 23 15:18:43 2022 +0200
|
||||
|
||||
d4f8f2d0354832101f48d60f0b3445cc1f43dd23
|
||||
# Author: borisflagell
|
||||
# Date: Sat Apr 23 15:01:24 2022 +0200
|
||||
|
||||
a7045a234353de795494c0b3f378808b4a6d32aa
|
||||
# Author: borisflagell
|
||||
# Date: Thu Apr 21 19:20:16 2022 +0200
|
||||
|
||||
421e7b8c74eb85238ccf45b1a83225a452024058
|
||||
# Author: borisflagell
|
||||
# Date: Thu Apr 21 18:51:04 2022 +0200
|
||||
|
||||
9850b56711b29c254102ad8694b1610b4d5adc81
|
||||
# Author: Snarling
|
||||
# Date: Sun Apr 17 17:23:14 2022 -0400
|
||||
|
||||
567fcf8fb63bc469ae61013cca511a76eb6f9086
|
||||
# Author: violet
|
||||
# Date: Wed Apr 13 14:42:07 2022 -0500
|
||||
|
||||
f6af85a38d8286aec702556f1296565de5a5067f
|
||||
# Author: violet
|
||||
# Date: Sun Apr 10 15:57:34 2022 -0500
|
||||
|
||||
57f04d3911b5a384c379dcfb2d0bcb18b25c37ea
|
||||
# Author: violet
|
||||
# Date: Thu Apr 7 11:45:21 2022 -0500
|
||||
|
||||
720e2112c6766b581e43e1f9e712c47300b22dcd
|
||||
# Author: violet
|
||||
# Date: Mon Mar 21 14:40:17 2022 -0500
|
||||
|
||||
ecffc8655a70e6e3c7bd03ba5723b437d7857dfa
|
||||
Merge: 8506dcfed 00d1d294e
|
||||
# Author: hydroflame
|
||||
# Date: Sun Mar 20 22:21:00 2022 -0400
|
||||
|
||||
901ee92fe97606bd27840900512b0fa760ba428e
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Sun Mar 20 22:02:36 2022 -0400
|
||||
|
||||
b3f9380ebd3feb3b6ef91873a1c6a3a1ddc56654
|
||||
# Author: Billy Vong
|
||||
# Date: Fri Dec 17 12:56:48 2021 -0500
|
||||
|
||||
# I *really* didn't want to include this one because it has a few tiny, actual
|
||||
# code changes, but it reformats tens of thousands of lines of code. Argh.
|
||||
8f13363466c2e825bbfb7e4b66d853c4805eda61
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Mon Oct 11 16:38:50 2021 -0400
|
||||
|
||||
66a2adaeb4b12a48fc8fdafe5e5169919f8d46a5
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Wed Sep 22 12:56:55 2021 -0400
|
||||
|
||||
## Additional changes that should be ignored for blame.
|
||||
|
||||
2e7f164b5f251ce457f0d3b9a42cfa0f08ef200e
|
||||
# Author: tyasuh.taeragan
|
||||
# Date: Fri Oct 22 16:35:05 2021 -0400
|
||||
|
||||
a18bdd6afc77752bded2f0794bf35ad9d6455fa1
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Sat Sep 4 19:09:30 2021 -0400
|
||||
|
||||
# from a search for "lint"; many more of these had significant code changes than
|
||||
# Prettier, so I'm only vetting the largest for inclusion
|
||||
|
||||
48f80f25d6fb90edc292481905814c0d5593b5a9
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Wed Apr 6 19:30:08 2022 -0400
|
||||
|
||||
b0f20c8c8f4859f01cfc79bc3945a8e7272d6592
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Sat Sep 25 01:26:03 2021 -0400
|
||||
|
||||
d745150c45979ab251b51447a0847e28966346a6
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Sat May 1 03:17:31 2021 -0400
|
||||
|
||||
3fad5050961a3259b0158763f48016174a2a690e
|
||||
# Author: Olivier Gagnon
|
||||
# Date: Thu Apr 29 23:52:56 2021 -0400
|
||||
|
||||
#
|
||||
# The commits listed below showed up on a search for "[Pp]rettier", but
|
||||
# weren't just Prettier/lint changes.
|
||||
#
|
||||
|
||||
# 6459b1ab483cf66ae1e6e50518424311c6bbbd8b
|
||||
# Author: omuretsu
|
||||
# Date: Sat Feb 4 07:42:35 2023 -0500
|
||||
|
||||
# 5b4addbb212411aa1de27ba0ee16ebaabedbc6a1
|
||||
# Author: borisflagell
|
||||
# Date: Sun May 22 01:08:53 2022 +0200
|
||||
|
||||
# 705a56f3bdcb859179144cdafab7eeb8832f7eb9
|
||||
# Author: borisflagell
|
||||
# Date: Sat May 7 12:55:56 2022 +0200
|
||||
|
||||
# 4fa65322fe770dc3d79cd0301521d230694a1fc7
|
||||
# Author: borisflagell
|
||||
# Date: Thu Apr 21 18:37:47 2022 +0200
|
||||
|
||||
# 81d1c02fdfe087c3bd0a2a8a2a41c2f82a6fef56
|
||||
# Author: hydroflame
|
||||
# Date: Sun Mar 20 22:50:42 2022 -0400
|
||||
|
||||
# 4a7fcda86f5d3d05638b4a9f3a61e5937dde52c6
|
||||
# Author: hydroflame
|
||||
# Date: Sat Sep 4 19:03:05 2021 -0400
|
||||
|
||||
# 7ee2612c17a90a80e5a0a7793a4c81465e212c0c
|
||||
# Author: Martin Fournier
|
||||
# Date: Sun Jan 9 11:15:09 2022 -0500
|
||||
|
||||
# c59806c87d543c7cc78d1d68af9599d118c0cb2b
|
||||
# Author: Martin Fournier
|
||||
# Date: Fri Dec 17 09:54:32 2021 -0500
|
||||
|
||||
# 306facc0d10104d543974d5cb01b6ff419c9acb2
|
||||
# Author: David Edmondson
|
||||
# Date: Sat Sep 4 22:17:30 2021 -0700
|
||||
|
||||
# 1e42f73e2a1b7ac9489a7287c7be99298f412ac0
|
||||
# Author: David Edmondson
|
||||
# Date: Sat Sep 4 13:18:08 2021 -0700commit 2e7f164b5f251ce457f0d3b9a42cfa0f08ef200e
|
||||
@@ -15,3 +15,5 @@ markdown
|
||||
package.json
|
||||
package.lock.json
|
||||
tsdoc-metadata.json
|
||||
|
||||
.git_blame_ignore_revs
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import JSDOMEnvironment from "jest-environment-jsdom";
|
||||
import { cloneDeep } from "lodash";
|
||||
|
||||
// https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
|
||||
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
|
||||
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
|
||||
super(...args);
|
||||
|
||||
// TODO Tests aren't polyfilled.
|
||||
this.global.structuredClone = cloneDeep;
|
||||
// FIXME https://github.com/nodejs/node/issues/35889
|
||||
// Add missing importActual() function to mirror requireActual(),
|
||||
// which lets us work around the ESM bug.
|
||||
|
||||
93
dist/OFL.txt
vendored
Normal file
93
dist/OFL.txt
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -207,9 +207,17 @@ the following rules:
|
||||
- Ensure you have run `npm run lint` to make sure your changes conform to the
|
||||
rules enforced across the code base. The command will fail if any of the
|
||||
linters find a violation.
|
||||
- Ensure you have run `npm run format` to make sure your changes conform to the
|
||||
style guide.
|
||||
- Also, ensure you have run `npm run test` to make sure your changes pass
|
||||
the automated tests.
|
||||
- Do not check in any bundled files (`dist\*.bundle.js`) or the `index.html`
|
||||
in the root of the repository. These will be updated as part of official
|
||||
releases.
|
||||
- The title of your Pull Request will need to be formatted like
|
||||
`MISC: Reticulated the splines`, where the first word must be capitalised
|
||||
and relate to the kind of change being implemented. Possible examples
|
||||
are UI, BUGFIX, SERVERS, NETSCRIPT... You get the idea.
|
||||
|
||||
## As a Documenter
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ async function createWindow(killall) {
|
||||
window.removeMenu();
|
||||
noScripts = killall ? { query: { noScripts: killall } } : {};
|
||||
window.loadFile("index.html", noScripts);
|
||||
window.once("ready-to-show", () => {
|
||||
utils.setZoomFactor(window, utils.getZoomFactor());
|
||||
});
|
||||
window.show();
|
||||
if (debug) window.webContents.openDevTools();
|
||||
|
||||
@@ -60,7 +63,6 @@ async function createWindow(killall) {
|
||||
|
||||
achievements.enableAchievementsInterval(window);
|
||||
utils.attachUnresponsiveAppHandler(window);
|
||||
utils.setZoomFactor(window);
|
||||
|
||||
try {
|
||||
await api.initialize(window);
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
/* eslint-disable no-process-exit */
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { app, dialog, BrowserWindow, ipcMain, protocol } = require("electron");
|
||||
|
||||
const log = require("electron-log");
|
||||
log.catchErrors();
|
||||
|
||||
// This handler must be set ASAP to prevent ghost processes.
|
||||
process.on("uncaughtException", function () {
|
||||
// The exception will be logged by electron-log.
|
||||
app.quit();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// This handler must be set ASAP to prevent ghost processes.
|
||||
app.on("window-all-closed", () => {
|
||||
log.info("Quitting the app...");
|
||||
app.quit();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
const greenworks = require("./greenworks");
|
||||
const api = require("./api-server");
|
||||
const gameWindow = require("./gameWindow");
|
||||
@@ -17,15 +34,8 @@ const { fileURLToPath } = require("url");
|
||||
log.transports.file.level = store.get("file-log-level", "info");
|
||||
log.transports.console.level = store.get("console-log-level", "debug");
|
||||
|
||||
log.catchErrors();
|
||||
log.info(`Started app: ${JSON.stringify(process.argv)}`);
|
||||
|
||||
process.on("uncaughtException", function () {
|
||||
// The exception will already have been logged by electron-log
|
||||
app.quit();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// We want to fail gracefully if we cannot connect to Steam
|
||||
try {
|
||||
if (greenworks && greenworks.init()) {
|
||||
@@ -42,13 +52,6 @@ try {
|
||||
|
||||
let isRestoreDisabled = false;
|
||||
|
||||
// This was moved so that startup errors do not lead to ghost processes
|
||||
app.on("window-all-closed", () => {
|
||||
log.info("Quitting the app...");
|
||||
app.quit();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
function setStopProcessHandler(app, window) {
|
||||
const closingWindowHandler = async (e) => {
|
||||
// We need to prevent the default closing event to add custom logic
|
||||
@@ -152,7 +155,7 @@ function setStopProcessHandler(app, window) {
|
||||
log.debug("Saving to Steam Cloud ...");
|
||||
try {
|
||||
const playerId = window.gameInfo.player.identifier;
|
||||
await storage.pushGameSaveToSteamCloud(save, playerId);
|
||||
await storage.pushSaveDataToSteamCloud(save, playerId);
|
||||
log.silly("Saved Game to Steam Cloud");
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
@@ -203,7 +206,7 @@ app.on("ready", async () => {
|
||||
if ((method === "GET" && relativePath.startsWith("dist")) || relativePath.match(/^[a-zA-Z-_]*\.html/)) {
|
||||
return callback(filePath);
|
||||
}
|
||||
log.error("Tried to access a page outside sandbox.");
|
||||
log.error(`Tried to access a page outside the sandbox. Url: ${url}. Method: ${method}.`);
|
||||
callback(path.join(__dirname, "fileError.txt"));
|
||||
});
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ function getMenu(window) {
|
||||
enabled: storage.isCloudEnabled(),
|
||||
click: async () => {
|
||||
try {
|
||||
const saveGame = await storage.getSteamCloudSaveString();
|
||||
await storage.pushSaveGameForImport(window, saveGame, false);
|
||||
const saveData = await storage.getSteamCloudSaveData();
|
||||
await storage.pushSaveGameForImport(window, saveData, false);
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
utils.writeToast(window, "Could not load from Steam Cloud", "error", 5000);
|
||||
@@ -114,16 +114,6 @@ function getMenu(window) {
|
||||
{
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
label: "Compress Disk Saves (.gz)",
|
||||
type: "checkbox",
|
||||
checked: storage.isSaveCompressionEnabled(),
|
||||
click: (menuItem) => {
|
||||
storage.setSaveCompressionConfig(menuItem.checked);
|
||||
utils.writeToast(window, `${menuItem.checked ? "Enabled" : "Disabled"} Save Compression`, "info", 5000);
|
||||
refreshMenu(window);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Auto-Save to Disk",
|
||||
type: "checkbox",
|
||||
@@ -222,7 +212,7 @@ function getMenu(window) {
|
||||
click: () => window.loadFile("index.html"),
|
||||
},
|
||||
{
|
||||
label: "Reload & Kill All Scripts",
|
||||
label: "Reload && Kill All Scripts",
|
||||
click: () => utils.reloadAndKill(window, true),
|
||||
},
|
||||
],
|
||||
|
||||
4
electron/package-lock.json
generated
4
electron/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bitburner",
|
||||
"version": "2.5.2",
|
||||
"version": "2.6.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bitburner",
|
||||
"version": "2.5.2",
|
||||
"version": "2.6.2",
|
||||
"dependencies": {
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-store": "^8.1.0",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "bitburner",
|
||||
"version": "2.5.2",
|
||||
"version": "2.6.2",
|
||||
"description": "A cyberpunk-themed programming incremental game",
|
||||
"main": "main.js",
|
||||
"author": "Daniel Xie, Olivier Gagnon, et al.",
|
||||
"author": "Daniel Xie, hydroflame, et al.",
|
||||
"mac": {
|
||||
"icon": "./public/icons/mac/icon.icns",
|
||||
"category": "public.app-category.games"
|
||||
|
||||
1
electron/saveDataBinaryFormat.d.ts
vendored
Normal file
1
electron/saveDataBinaryFormat.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const isBinaryFormat: (saveData: string | Uint8Array) => boolean;
|
||||
13
electron/saveDataBinaryFormat.js
Normal file
13
electron/saveDataBinaryFormat.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// The 2 magic bytes of the gzip header plus the mandatory compression type of DEFLATE
|
||||
const magicBytes = [0x1f, 0x8b, 0x08];
|
||||
|
||||
function isBinaryFormat(rawData) {
|
||||
for (let i = 0; i < magicBytes.length; ++i) {
|
||||
if (magicBytes[i] !== rawData[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = { isBinaryFormat };
|
||||
@@ -11,6 +11,7 @@ const greenworks = require("./greenworks");
|
||||
const log = require("electron-log");
|
||||
const flatten = require("lodash/flatten");
|
||||
const Store = require("electron-store");
|
||||
const { isBinaryFormat } = require("./saveDataBinaryFormat");
|
||||
const store = new Store();
|
||||
|
||||
// https://stackoverflow.com/a/69418940
|
||||
@@ -86,14 +87,6 @@ function isAutosaveEnabled() {
|
||||
return store.get("autosave-enabled", true);
|
||||
}
|
||||
|
||||
function setSaveCompressionConfig(value) {
|
||||
store.set("save-compression-enabled", value);
|
||||
}
|
||||
|
||||
function isSaveCompressionEnabled() {
|
||||
return store.get("save-compression-enabled", true);
|
||||
}
|
||||
|
||||
function setCloudEnabledConfig(value) {
|
||||
store.set("cloud-enabled", value);
|
||||
}
|
||||
@@ -163,17 +156,22 @@ async function backupSteamDataToDisk(currentPlayerId) {
|
||||
const file = greenworks.getFileNameAndSize(0);
|
||||
const previousPlayerId = file.name.replace(".json.gz", "");
|
||||
if (previousPlayerId !== currentPlayerId) {
|
||||
const backupSave = await getSteamCloudSaveString();
|
||||
const backupSaveData = await getSteamCloudSaveData();
|
||||
const backupFile = path.join(app.getPath("userData"), "/saves/_backups", `${previousPlayerId}.json.gz`);
|
||||
const buffer = Buffer.from(backupSave, "base64").toString("utf8");
|
||||
saveContent = await gzip(buffer);
|
||||
await fs.writeFile(backupFile, saveContent, "utf8");
|
||||
await fs.writeFile(backupFile, backupSaveData, "utf8");
|
||||
log.debug(`Saved backup game to '${backupFile}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
|
||||
if (!isCloudEnabled) return Promise.reject("Steam Cloud is not Enabled");
|
||||
/**
|
||||
* The name of save file is `${currentPlayerId}.json.gz`. The content of save file is weird: it's a base64 string of the
|
||||
* binary data of compressed json save string. It's weird because the extension is .json.gz while the content is a
|
||||
* base64 string. Check the comments in the implementation to see why it is like that.
|
||||
*/
|
||||
async function pushSaveDataToSteamCloud(saveData, currentPlayerId) {
|
||||
if (!isCloudEnabled()) {
|
||||
return Promise.reject("Steam Cloud is not Enabled");
|
||||
}
|
||||
|
||||
try {
|
||||
backupSteamDataToDisk(currentPlayerId);
|
||||
@@ -183,12 +181,19 @@ async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
|
||||
|
||||
const steamSaveName = `${currentPlayerId}.json.gz`;
|
||||
|
||||
// Let's decode the base64 string so GZIP is more efficient.
|
||||
const buffer = Buffer.from(base64save, "base64");
|
||||
const compressedBuffer = await gzip(buffer);
|
||||
// We can't use utf8 for some reason, steamworks is unhappy.
|
||||
const content = compressedBuffer.toString("base64");
|
||||
log.debug(`Uncompressed: ${base64save.length} bytes`);
|
||||
/**
|
||||
* When we push save file to Steam Cloud, we use greenworks.saveTextToFile. It seems that this method expects a string
|
||||
* as the file content. That is why saveData is encoded in base64 and pushed to Steam Cloud as a text file.
|
||||
*
|
||||
* Encoding saveData in UTF-8 (with buffer.toString("utf8")) is not the proper way to convert binary data to string.
|
||||
* Quote from buffer's documentation: "If encoding is 'utf8' and a byte sequence in the input is not valid UTF-8, then
|
||||
* each invalid byte is replaced with the replacement character U+FFFD.". The proper way to do it is to use
|
||||
* String.fromCharCode or String.fromCodePoint.
|
||||
*
|
||||
* Instead of implementing it, the old code (encoding in base64) is used here for backward compatibility.
|
||||
*/
|
||||
const content = saveData.toString("base64");
|
||||
log.debug(`Uncompressed: ${saveData.length} bytes`);
|
||||
log.debug(`Compressed: ${content.length} bytes`);
|
||||
log.debug(`Saving to Steam Cloud as ${steamSaveName}`);
|
||||
|
||||
@@ -199,19 +204,22 @@ async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
|
||||
}
|
||||
}
|
||||
|
||||
async function getSteamCloudSaveString() {
|
||||
if (!isCloudEnabled()) return Promise.reject("Steam Cloud is not Enabled");
|
||||
/**
|
||||
* This function processes the save file in Steam Cloud and returns the save data in the binary format.
|
||||
*/
|
||||
async function getSteamCloudSaveData() {
|
||||
if (!isCloudEnabled()) {
|
||||
return Promise.reject("Steam Cloud is not Enabled");
|
||||
}
|
||||
log.debug(`Fetching Save in Steam Cloud`);
|
||||
const cloudString = await getCloudFile();
|
||||
const gzippedBase64Buffer = Buffer.from(cloudString, "base64");
|
||||
const uncompressedBuffer = await gunzip(gzippedBase64Buffer);
|
||||
const content = uncompressedBuffer.toString("base64");
|
||||
log.debug(`Compressed: ${cloudString.length} bytes`);
|
||||
log.debug(`Uncompressed: ${content.length} bytes`);
|
||||
return content;
|
||||
// Decode cloudString to get save data back.
|
||||
const saveData = Buffer.from(cloudString, "base64");
|
||||
log.debug(`SaveData: ${saveData.length} bytes`);
|
||||
return saveData;
|
||||
}
|
||||
|
||||
async function saveGameToDisk(window, saveData) {
|
||||
async function saveGameToDisk(window, electronGameData) {
|
||||
const currentFolder = await getSaveFolder(window);
|
||||
let saveFolderSizeBytes = await getFolderSizeInBytes(currentFolder);
|
||||
const maxFolderSizeBytes = store.get("autosave-quota", 1e8); // 100Mb per playerIndentifier
|
||||
@@ -221,19 +229,12 @@ async function saveGameToDisk(window, saveData) {
|
||||
log.debug(
|
||||
`Remaining: ${remainingSpaceBytes} bytes (${((saveFolderSizeBytes / maxFolderSizeBytes) * 100).toFixed(2)}% used)`,
|
||||
);
|
||||
const shouldCompress = isSaveCompressionEnabled();
|
||||
const fileName = saveData.fileName;
|
||||
const file = path.join(currentFolder, fileName + (shouldCompress ? ".gz" : ""));
|
||||
let saveData = electronGameData.save;
|
||||
const file = path.join(currentFolder, electronGameData.fileName);
|
||||
try {
|
||||
let saveContent = saveData.save;
|
||||
if (shouldCompress) {
|
||||
// Let's decode the base64 string so GZIP is more efficient.
|
||||
const buffer = Buffer.from(saveContent, "base64").toString("utf8");
|
||||
saveContent = await gzip(buffer);
|
||||
}
|
||||
await fs.writeFile(file, saveContent, "utf8");
|
||||
await fs.writeFile(file, saveData, "utf8");
|
||||
log.debug(`Saved Game to '${file}'`);
|
||||
log.debug(`Save Size: ${saveContent.length} bytes`);
|
||||
log.debug(`Save Size: ${saveData.length} bytes`);
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
}
|
||||
@@ -276,14 +277,14 @@ async function loadLastFromDisk(window) {
|
||||
async function loadFileFromDisk(path) {
|
||||
const buffer = await fs.readFile(path);
|
||||
let content;
|
||||
if (path.endsWith(".gz")) {
|
||||
const uncompressedBuffer = await gunzip(buffer);
|
||||
content = uncompressedBuffer.toString("base64");
|
||||
log.debug(`Uncompressed file content (new size: ${content.length} bytes)`);
|
||||
if (isBinaryFormat(buffer)) {
|
||||
// Save file is in the binary format.
|
||||
content = buffer;
|
||||
} else {
|
||||
// Save file is in the base64 format.
|
||||
content = buffer.toString("utf8");
|
||||
log.debug(`Loaded file with ${content.length} bytes`);
|
||||
}
|
||||
log.debug(`Loaded file with ${content.length} bytes`);
|
||||
return content;
|
||||
}
|
||||
|
||||
@@ -319,7 +320,7 @@ async function restoreIfNewerExists(window) {
|
||||
const disk = {};
|
||||
|
||||
try {
|
||||
steam.save = await getSteamCloudSaveString();
|
||||
steam.save = await getSteamCloudSaveData();
|
||||
steam.data = await getSaveInformation(window, steam.save);
|
||||
} catch (error) {
|
||||
log.error("Could not retrieve steam file");
|
||||
@@ -361,12 +362,12 @@ async function restoreIfNewerExists(window) {
|
||||
// We add a few seconds to the currentSave's lastSave to prioritize it
|
||||
log.info("Found newer data than the current's save file");
|
||||
log.silly(bestMatch.data);
|
||||
await pushSaveGameForImport(window, bestMatch.save, true);
|
||||
pushSaveGameForImport(window, bestMatch.save, true);
|
||||
return true;
|
||||
} else if (bestMatch.data.playtime > currentData.playtime && currentData.playtime < lowPlaytime) {
|
||||
log.info("Found older save, but with more playtime, and current less than 15 mins played");
|
||||
log.silly(bestMatch.data);
|
||||
await pushSaveGameForImport(window, bestMatch.save, true);
|
||||
pushSaveGameForImport(window, bestMatch.save, true);
|
||||
return true;
|
||||
} else {
|
||||
log.debug("Current save data is the freshest");
|
||||
@@ -380,8 +381,8 @@ module.exports = {
|
||||
getSaveInformation,
|
||||
restoreIfNewerExists,
|
||||
pushSaveGameForImport,
|
||||
pushGameSaveToSteamCloud,
|
||||
getSteamCloudSaveString,
|
||||
pushSaveDataToSteamCloud,
|
||||
getSteamCloudSaveData,
|
||||
getSteamCloudQuota,
|
||||
deleteCloudFile,
|
||||
saveGameToDisk,
|
||||
@@ -394,6 +395,4 @@ module.exports = {
|
||||
setCloudEnabledConfig,
|
||||
isAutosaveEnabled,
|
||||
setAutosaveConfig,
|
||||
isSaveCompressionEnabled,
|
||||
setSaveCompressionConfig,
|
||||
};
|
||||
|
||||
@@ -7,8 +7,12 @@ const store = new Store();
|
||||
|
||||
function reloadAndKill(window, killScripts) {
|
||||
log.info("Reloading & Killing all scripts...");
|
||||
const zoomFactor = getZoomFactor();
|
||||
window.webContents.forcefullyCrashRenderer();
|
||||
window.loadFile("index.html", killScripts ? { query: { noScripts: true } } : {});
|
||||
window.once("ready-to-show", () => {
|
||||
setZoomFactor(window, zoomFactor);
|
||||
});
|
||||
}
|
||||
|
||||
function promptForReload(window) {
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = {
|
||||
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
|
||||
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
|
||||
testEnvironment: "./FixJSDOMEnvironment.ts",
|
||||
setupFiles: ["./jest.polyfills.js"],
|
||||
moduleNameMapper: {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
||||
"<rootDir>/test/__mocks__/fileMock.js",
|
||||
|
||||
6
jest.polyfills.js
Normal file
6
jest.polyfills.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const { TextEncoder, TextDecoder } = require("node:util");
|
||||
|
||||
Object.defineProperties(globalThis, {
|
||||
TextEncoder: { value: TextEncoder },
|
||||
TextDecoder: { value: TextDecoder },
|
||||
});
|
||||
@@ -18,5 +18,5 @@ interface BasicHGWOptions
|
||||
| --- | --- | --- | --- |
|
||||
| [additionalMsec?](./bitburner.basichgwoptions.additionalmsec.md) | | number | _(Optional)_ Number of additional milliseconds that will be spent waiting between the start of the function and when it completes. |
|
||||
| [stock?](./bitburner.basichgwoptions.stock.md) | | boolean | _(Optional)_ Set to true this action will affect the stock market. |
|
||||
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. |
|
||||
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values. |
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## BasicHGWOptions.threads property
|
||||
|
||||
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with.
|
||||
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Get the reputation gain of an action.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getActionRepGain(type: string, name: string, level: number): number;
|
||||
getActionRepGain(type: string, name: string, level?: number): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -18,7 +18,7 @@ getActionRepGain(type: string, name: string, level: number): number;
|
||||
| --- | --- | --- |
|
||||
| type | string | Type of action. |
|
||||
| name | string | Name of action. Must be an exact match. |
|
||||
| level | number | Optional number. Action level at which to calculate the gain. Will be the action's current level if not given. |
|
||||
| level | number | _(Optional)_ Optional number. Action level at which to calculate the gain. Will be the action's current level if not given. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,17 +9,15 @@ Get current action.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getCurrentAction(): BladeburnerCurAction;
|
||||
getCurrentAction(): BladeburnerCurAction | null;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[BladeburnerCurAction](./bitburner.bladeburnercuraction.md)
|
||||
[BladeburnerCurAction](./bitburner.bladeburnercuraction.md) \| null
|
||||
|
||||
Object that represents the player’s current Bladeburner action.
|
||||
Object that represents the player’s current Bladeburner action, or null if no action is being performed.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 1 GB
|
||||
|
||||
Returns an object that represents the player’s current Bladeburner action. If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ RAM cost: 4 GB
|
||||
|
||||
This function returns the number of skill points needed to upgrade the specified skill the specified number of times.
|
||||
|
||||
The function returns -1 if an invalid skill name is passed in.
|
||||
The function returns -1 if an invalid skill name is passed in, and Infinity if the count overflows the maximum level.
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ Get team size.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getTeamSize(type: string, name: string): number;
|
||||
getTeamSize(type?: string, name?: string): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| type | string | Type of action. |
|
||||
| name | string | Name of action. Must be an exact match. |
|
||||
| type | string | _(Optional)_ Type of action. |
|
||||
| name | string | _(Optional)_ Name of action. Must be an exact match. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
@@ -29,7 +29,7 @@ Number of Bladeburner team members that were assigned to the specified action.
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
Returns the number of Bladeburner team members you have assigned to the specified action.
|
||||
Returns the number of available Bladeburner team members. You can also pass the type and name of an action to get the number of Bladeburner team members you have assigned to the specified action.
|
||||
|
||||
Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.
|
||||
|
||||
|
||||
@@ -36,9 +36,11 @@ Attempts to solve the Coding Contract with the provided solution.
|
||||
|
||||
|
||||
```js
|
||||
const reward = codingcontract.attempt(yourSolution, filename, hostname);
|
||||
const reward = ns.codingcontract.attempt(yourSolution, filename, hostname);
|
||||
if (reward) {
|
||||
ns.tprint(`Contract solved successfully! Reward: ${reward}`)
|
||||
} else ns.tprint("Failed to solve contract.")
|
||||
ns.tprint(`Contract solved successfully! Reward: ${reward}`);
|
||||
} else {
|
||||
ns.tprint("Failed to solve contract.");
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Generate a dummy contract.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
createDummyContract(type: string): void;
|
||||
createDummyContract(type: string): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ createDummyContract(type: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
string
|
||||
|
||||
Filename of the contract.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
11
markdown/bitburner.companyworktask.companyname.md
Normal file
11
markdown/bitburner.companyworktask.companyname.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyWorkTask](./bitburner.companyworktask.md) > [companyName](./bitburner.companyworktask.companyname.md)
|
||||
|
||||
## CompanyWorkTask.companyName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
companyName: CompanyName;
|
||||
```
|
||||
11
markdown/bitburner.companyworktask.cyclesworked.md
Normal file
11
markdown/bitburner.companyworktask.cyclesworked.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyWorkTask](./bitburner.companyworktask.md) > [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
|
||||
|
||||
## CompanyWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
||||
26
markdown/bitburner.companyworktask.md
Normal file
26
markdown/bitburner.companyworktask.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyWorkTask](./bitburner.companyworktask.md)
|
||||
|
||||
## CompanyWorkTask interface
|
||||
|
||||
Company Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CompanyWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current work for a company
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
|
||||
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
|
||||
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |
|
||||
|
||||
11
markdown/bitburner.companyworktask.type.md
Normal file
11
markdown/bitburner.companyworktask.type.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyWorkTask](./bitburner.companyworktask.md) > [type](./bitburner.companyworktask.type.md)
|
||||
|
||||
## CompanyWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "COMPANY";
|
||||
```
|
||||
@@ -41,5 +41,6 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
|
||||
| [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level an upgrade. |
|
||||
| [nextUpdate()](./bitburner.corporation.nextupdate.md) | Sleep until the next Corporation update has happened. |
|
||||
| [purchaseUnlock(upgradeName)](./bitburner.corporation.purchaseunlock.md) | Unlock an upgrade |
|
||||
| [sellDivision(divisionName)](./bitburner.corporation.selldivision.md) | Sell a division |
|
||||
| [sellShares(amount)](./bitburner.corporation.sellshares.md) | Sell Shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. |
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ The amount of real time spent asleep between updates can vary due to "bonus time
|
||||
```js
|
||||
while (true) {
|
||||
const prevState = await ns.corporation.nextUpdate();
|
||||
const nextState = ns.corporation.getCorporation().state;
|
||||
const nextState = ns.corporation.getCorporation().nextState;
|
||||
ns.print(`Corporation finished with ${prevState}, next will be ${nextState}.`);
|
||||
// Manage the Corporation
|
||||
}
|
||||
|
||||
28
markdown/bitburner.corporation.selldivision.md
Normal file
28
markdown/bitburner.corporation.selldivision.md
Normal file
@@ -0,0 +1,28 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [sellDivision](./bitburner.corporation.selldivision.md)
|
||||
|
||||
## Corporation.sellDivision() method
|
||||
|
||||
Sell a division
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
sellDivision(divisionName: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
11
markdown/bitburner.createprogramworktask.cyclesworked.md
Normal file
11
markdown/bitburner.createprogramworktask.cyclesworked.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
|
||||
|
||||
## CreateProgramWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
||||
26
markdown/bitburner.createprogramworktask.md
Normal file
26
markdown/bitburner.createprogramworktask.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md)
|
||||
|
||||
## CreateProgramWorkTask interface
|
||||
|
||||
Create Program
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CreateProgramWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the status of the program being created
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
|
||||
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
|
||||
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |
|
||||
|
||||
11
markdown/bitburner.createprogramworktask.programname.md
Normal file
11
markdown/bitburner.createprogramworktask.programname.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [programName](./bitburner.createprogramworktask.programname.md)
|
||||
|
||||
## CreateProgramWorkTask.programName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
programName: string;
|
||||
```
|
||||
11
markdown/bitburner.createprogramworktask.type.md
Normal file
11
markdown/bitburner.createprogramworktask.type.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [type](./bitburner.createprogramworktask.type.md)
|
||||
|
||||
## CreateProgramWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "CREATE_PROGRAM";
|
||||
```
|
||||
11
markdown/bitburner.crimetask.crimetype.md
Normal file
11
markdown/bitburner.crimetask.crimetype.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeTask](./bitburner.crimetask.md) > [crimeType](./bitburner.crimetask.crimetype.md)
|
||||
|
||||
## CrimeTask.crimeType property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
crimeType: CrimeType;
|
||||
```
|
||||
11
markdown/bitburner.crimetask.cyclesworked.md
Normal file
11
markdown/bitburner.crimetask.cyclesworked.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeTask](./bitburner.crimetask.md) > [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
|
||||
|
||||
## CrimeTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
||||
26
markdown/bitburner.crimetask.md
Normal file
26
markdown/bitburner.crimetask.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeTask](./bitburner.crimetask.md)
|
||||
|
||||
## CrimeTask interface
|
||||
|
||||
Crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CrimeTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the crime being commited
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | |
|
||||
| [cyclesWorked](./bitburner.crimetask.cyclesworked.md) | | number | |
|
||||
| [type](./bitburner.crimetask.type.md) | | "CRIME" | |
|
||||
|
||||
11
markdown/bitburner.crimetask.type.md
Normal file
11
markdown/bitburner.crimetask.type.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeTask](./bitburner.crimetask.md) > [type](./bitburner.crimetask.type.md)
|
||||
|
||||
## CrimeTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "CRIME";
|
||||
```
|
||||
11
markdown/bitburner.factionworktask.cyclesworked.md
Normal file
11
markdown/bitburner.factionworktask.cyclesworked.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md) > [cyclesWorked](./bitburner.factionworktask.cyclesworked.md)
|
||||
|
||||
## FactionWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
||||
11
markdown/bitburner.factionworktask.factionname.md
Normal file
11
markdown/bitburner.factionworktask.factionname.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md) > [factionName](./bitburner.factionworktask.factionname.md)
|
||||
|
||||
## FactionWorkTask.factionName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
factionName: string;
|
||||
```
|
||||
11
markdown/bitburner.factionworktask.factionworktype.md
Normal file
11
markdown/bitburner.factionworktask.factionworktype.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md) > [factionWorkType](./bitburner.factionworktask.factionworktype.md)
|
||||
|
||||
## FactionWorkTask.factionWorkType property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
factionWorkType: FactionWorkType;
|
||||
```
|
||||
27
markdown/bitburner.factionworktask.md
Normal file
27
markdown/bitburner.factionworktask.md
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md)
|
||||
|
||||
## FactionWorkTask interface
|
||||
|
||||
Faction Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface FactionWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current work for a faction
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [cyclesWorked](./bitburner.factionworktask.cyclesworked.md) | | number | |
|
||||
| [factionName](./bitburner.factionworktask.factionname.md) | | string | |
|
||||
| [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | |
|
||||
| [type](./bitburner.factionworktask.type.md) | | "FACTION" | |
|
||||
|
||||
11
markdown/bitburner.factionworktask.type.md
Normal file
11
markdown/bitburner.factionworktask.type.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md) > [type](./bitburner.factionworktask.type.md)
|
||||
|
||||
## FactionWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "FACTION";
|
||||
```
|
||||
32
markdown/bitburner.gang.getinstallresult.md
Normal file
32
markdown/bitburner.gang.getinstallresult.md
Normal file
@@ -0,0 +1,32 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Gang](./bitburner.gang.md) > [getInstallResult](./bitburner.gang.getinstallresult.md)
|
||||
|
||||
## Gang.getInstallResult() method
|
||||
|
||||
Get the effect of an install on ascension multipliers without installing.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getInstallResult(memberName: string): GangMemberInstall | undefined;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| memberName | string | Name of member. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
[GangMemberInstall](./bitburner.gangmemberinstall.md) \| undefined
|
||||
|
||||
Object with info about the install results on ascension multipliers, or undefined if ascension is not possible.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 2 GB
|
||||
|
||||
Get [GangMemberInstall](./bitburner.gangmemberinstall.md) effects on ascension multipliers for a gang member after installing without performing the install.
|
||||
|
||||
@@ -31,6 +31,7 @@ If you are not in BitNode-2, then you must have Source-File 2 in order to use th
|
||||
| [getEquipmentStats(equipName)](./bitburner.gang.getequipmentstats.md) | Get stats of an equipment. |
|
||||
| [getEquipmentType(equipName)](./bitburner.gang.getequipmenttype.md) | Get type of an equipment. |
|
||||
| [getGangInformation()](./bitburner.gang.getganginformation.md) | Get information about your gang. |
|
||||
| [getInstallResult(memberName)](./bitburner.gang.getinstallresult.md) | Get the effect of an install on ascension multipliers without installing. |
|
||||
| [getMemberInformation(name)](./bitburner.gang.getmemberinformation.md) | Get information about a specific gang member. |
|
||||
| [getMemberNames()](./bitburner.gang.getmembernames.md) | List all gang members. |
|
||||
| [getOtherGangInformation()](./bitburner.gang.getotherganginformation.md) | Get information about the other gangs. |
|
||||
|
||||
13
markdown/bitburner.gangmemberinstall.agi.md
Normal file
13
markdown/bitburner.gangmemberinstall.agi.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [agi](./bitburner.gangmemberinstall.agi.md)
|
||||
|
||||
## GangMemberInstall.agi property
|
||||
|
||||
Factor by which the agility ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
agi: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberinstall.cha.md
Normal file
13
markdown/bitburner.gangmemberinstall.cha.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [cha](./bitburner.gangmemberinstall.cha.md)
|
||||
|
||||
## GangMemberInstall.cha property
|
||||
|
||||
Factor by which the charisma ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cha: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberinstall.def.md
Normal file
13
markdown/bitburner.gangmemberinstall.def.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [def](./bitburner.gangmemberinstall.def.md)
|
||||
|
||||
## GangMemberInstall.def property
|
||||
|
||||
Factor by which the defense ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
def: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberinstall.dex.md
Normal file
13
markdown/bitburner.gangmemberinstall.dex.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [dex](./bitburner.gangmemberinstall.dex.md)
|
||||
|
||||
## GangMemberInstall.dex property
|
||||
|
||||
Factor by which the dexterity ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
dex: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberinstall.hack.md
Normal file
13
markdown/bitburner.gangmemberinstall.hack.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [hack](./bitburner.gangmemberinstall.hack.md)
|
||||
|
||||
## GangMemberInstall.hack property
|
||||
|
||||
Factor by which the hacking ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
hack: number;
|
||||
```
|
||||
24
markdown/bitburner.gangmemberinstall.md
Normal file
24
markdown/bitburner.gangmemberinstall.md
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md)
|
||||
|
||||
## GangMemberInstall interface
|
||||
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
interface GangMemberInstall
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [agi](./bitburner.gangmemberinstall.agi.md) | | number | Factor by which the agility ascension multiplier was decreased (newMult / oldMult) |
|
||||
| [cha](./bitburner.gangmemberinstall.cha.md) | | number | Factor by which the charisma ascension multiplier was decreased (newMult / oldMult) |
|
||||
| [def](./bitburner.gangmemberinstall.def.md) | | number | Factor by which the defense ascension multiplier was decreased (newMult / oldMult) |
|
||||
| [dex](./bitburner.gangmemberinstall.dex.md) | | number | Factor by which the dexterity ascension multiplier was decreased (newMult / oldMult) |
|
||||
| [hack](./bitburner.gangmemberinstall.hack.md) | | number | Factor by which the hacking ascension multiplier was decreased (newMult / oldMult) |
|
||||
| [str](./bitburner.gangmemberinstall.str.md) | | number | Factor by which the strength ascension multiplier was decreased (newMult / oldMult) |
|
||||
|
||||
13
markdown/bitburner.gangmemberinstall.str.md
Normal file
13
markdown/bitburner.gangmemberinstall.str.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInstall](./bitburner.gangmemberinstall.md) > [str](./bitburner.gangmemberinstall.str.md)
|
||||
|
||||
## GangMemberInstall.str property
|
||||
|
||||
Factor by which the strength ascension multiplier was decreased (newMult / oldMult)
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
str: number;
|
||||
```
|
||||
23
markdown/bitburner.go.analysis.md
Normal file
23
markdown/bitburner.go.analysis.md
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [analysis](./bitburner.go.analysis.md)
|
||||
|
||||
## Go.analysis property
|
||||
|
||||
Tools to analyze the IPvGO subnet.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
analysis: {
|
||||
getValidMoves(): boolean[][];
|
||||
|
||||
getChains(): (number | null)[][];
|
||||
|
||||
getLiberties(): number[][];
|
||||
|
||||
getControlledEmptyNodes(): string[];
|
||||
|
||||
getStats(): Partial<Record<GoOpponent, SimpleOpponentStats>>;
|
||||
};
|
||||
```
|
||||
51
markdown/bitburner.go.cheat.md
Normal file
51
markdown/bitburner.go.cheat.md
Normal file
@@ -0,0 +1,51 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [cheat](./bitburner.go.cheat.md)
|
||||
|
||||
## Go.cheat property
|
||||
|
||||
Illicit and dangerous IPvGO tools. Not for the faint of heart. Requires Bitnode 14.2 to use.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cheat: {
|
||||
getCheatSuccessChance(): number;
|
||||
removeRouter(
|
||||
x: number,
|
||||
y: number,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
playTwoMoves(
|
||||
x1: number,
|
||||
y1: number,
|
||||
x2: number,
|
||||
y2: number,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
|
||||
repairOfflineNode(
|
||||
x: number,
|
||||
y: number,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
|
||||
destroyNode(
|
||||
x: number,
|
||||
y: number,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
};
|
||||
```
|
||||
31
markdown/bitburner.go.getboardstate.md
Normal file
31
markdown/bitburner.go.getboardstate.md
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getBoardState](./bitburner.go.getboardstate.md)
|
||||
|
||||
## Go.getBoardState() method
|
||||
|
||||
Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)
|
||||
|
||||
For example, a 5x5 board might look like this:
|
||||
|
||||
\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]
|
||||
|
||||
Each string represents a vertical column on the board, and each character in the string represents a point.
|
||||
|
||||
Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].
|
||||
|
||||
Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getBoardState(): string[];
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
string\[\]
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
19
markdown/bitburner.go.getcurrentplayer.md
Normal file
19
markdown/bitburner.go.getcurrentplayer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getCurrentPlayer](./bitburner.go.getcurrentplayer.md)
|
||||
|
||||
## Go.getCurrentPlayer() method
|
||||
|
||||
Returns the color of the current player, or 'None' if the game is over.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getCurrentPlayer(): "White" | "Black" | "None";
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
"White" \| "Black" \| "None"
|
||||
|
||||
"White" \| "Black" \| "None"
|
||||
|
||||
24
markdown/bitburner.go.getgamestate.md
Normal file
24
markdown/bitburner.go.getgamestate.md
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getGameState](./bitburner.go.getgamestate.md)
|
||||
|
||||
## Go.getGameState() method
|
||||
|
||||
Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move coordinates will be \[-1, -1\] for a pass, or if there are no prior moves.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getGameState(): {
|
||||
currentPlayer: "White" | "Black" | "None";
|
||||
whiteScore: number;
|
||||
blackScore: number;
|
||||
previousMove: [number, number] | null;
|
||||
komi: number;
|
||||
bonusCycles: number;
|
||||
};
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
{ currentPlayer: "White" \| "Black" \| "None"; whiteScore: number; blackScore: number; previousMove: \[number, number\] \| null; komi: number; bonusCycles: number; }
|
||||
|
||||
21
markdown/bitburner.go.getmovehistory.md
Normal file
21
markdown/bitburner.go.getmovehistory.md
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getMoveHistory](./bitburner.go.getmovehistory.md)
|
||||
|
||||
## Go.getMoveHistory() method
|
||||
|
||||
Returns all the prior moves in the current game, as an array of simple board states.
|
||||
|
||||
For example, a single 5x5 prior move board might look like this:
|
||||
|
||||
\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getMoveHistory(): string[][];
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
string\[\]\[\]
|
||||
|
||||
17
markdown/bitburner.go.getopponent.md
Normal file
17
markdown/bitburner.go.getopponent.md
Normal file
@@ -0,0 +1,17 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getOpponent](./bitburner.go.getopponent.md)
|
||||
|
||||
## Go.getOpponent() method
|
||||
|
||||
Returns the name of the opponent faction in the current subnet.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getOpponent(): GoOpponent | "No AI";
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[GoOpponent](./bitburner.goopponent.md) \| "No AI"
|
||||
|
||||
38
markdown/bitburner.go.makemove.md
Normal file
38
markdown/bitburner.go.makemove.md
Normal file
@@ -0,0 +1,38 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [makeMove](./bitburner.go.makemove.md)
|
||||
|
||||
## Go.makeMove() method
|
||||
|
||||
Make a move on the IPvGO subnet gameboard, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
makeMove(
|
||||
x: number,
|
||||
y: number,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>
|
||||
|
||||
a promise that contains the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
35
markdown/bitburner.go.md
Normal file
35
markdown/bitburner.go.md
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md)
|
||||
|
||||
## Go interface
|
||||
|
||||
IPvGO api
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface Go
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [analysis](./bitburner.go.analysis.md) | | { getValidMoves(): boolean\[\]\[\]; getChains(): (number \| null)\[\]\[\]; getLiberties(): number\[\]\[\]; getControlledEmptyNodes(): string\[\]; getStats(): Partial<Record<[GoOpponent](./bitburner.goopponent.md)<!-- -->, [SimpleOpponentStats](./bitburner.simpleopponentstats.md)<!-- -->>>; } | Tools to analyze the IPvGO subnet. |
|
||||
| [cheat](./bitburner.go.cheat.md) | | { getCheatSuccessChance(): number; removeRouter( x: number, y: number, ): Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>; playTwoMoves( x1: number, y1: number, x2: number, y2: number, ): Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>; repairOfflineNode( x: number, y: number, ): Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>; destroyNode( x: number, y: number, ): Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>; } | Illicit and dangerous IPvGO tools. Not for the faint of heart. Requires Bitnode 14.2 to use. |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [getBoardState()](./bitburner.go.getboardstate.md) | <p>Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)</p><p>For example, a 5x5 board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p><p>Each string represents a vertical column on the board, and each character in the string represents a point.</p><p>Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].</p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p> |
|
||||
| [getCurrentPlayer()](./bitburner.go.getcurrentplayer.md) | Returns the color of the current player, or 'None' if the game is over. |
|
||||
| [getGameState()](./bitburner.go.getgamestate.md) | Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move coordinates will be \[-1, -1\] for a pass, or if there are no prior moves. |
|
||||
| [getMoveHistory()](./bitburner.go.getmovehistory.md) | <p>Returns all the prior moves in the current game, as an array of simple board states.</p><p>For example, a single 5x5 prior move board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p> |
|
||||
| [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. |
|
||||
| [makeMove(x, y)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet gameboard, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
| [opponentNextTurn(logOpponentMove)](./bitburner.go.opponentnextturn.md) | Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
| [passTurn()](./bitburner.go.passturn.md) | <p>Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.</p><p>This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.</p> |
|
||||
| [resetBoardState(opponent, boardSize)](./bitburner.go.resetboardstate.md) | <p>Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.</p><p>Note that some factions will have a few routers on the subnet at this state.</p><p>opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",</p> |
|
||||
|
||||
34
markdown/bitburner.go.opponentnextturn.md
Normal file
34
markdown/bitburner.go.opponentnextturn.md
Normal file
@@ -0,0 +1,34 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [opponentNextTurn](./bitburner.go.opponentnextturn.md)
|
||||
|
||||
## Go.opponentNextTurn() method
|
||||
|
||||
Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
opponentNextTurn(logOpponentMove?: boolean): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| logOpponentMove | boolean | _(Optional)_ optional, defaults to true. if false prevents logging opponent move |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>
|
||||
|
||||
a promise that contains if your last move was valid and successful, the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
29
markdown/bitburner.go.passturn.md
Normal file
29
markdown/bitburner.go.passturn.md
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [passTurn](./bitburner.go.passturn.md)
|
||||
|
||||
## Go.passTurn() method
|
||||
|
||||
Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.
|
||||
|
||||
This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
passTurn(): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>
|
||||
|
||||
a promise that contains the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
35
markdown/bitburner.go.resetboardstate.md
Normal file
35
markdown/bitburner.go.resetboardstate.md
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [resetBoardState](./bitburner.go.resetboardstate.md)
|
||||
|
||||
## Go.resetBoardState() method
|
||||
|
||||
Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.
|
||||
|
||||
Note that some factions will have a few routers on the subnet at this state.
|
||||
|
||||
opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
resetBoardState(opponent: GoOpponent, boardSize: 5 | 7 | 9 | 13): string[] | undefined;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| opponent | [GoOpponent](./bitburner.goopponent.md) | |
|
||||
| boardSize | 5 \| 7 \| 9 \| 13 | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
string\[\] \| undefined
|
||||
|
||||
a simplified version of the board state as an array of strings representing the board columns. See ns.Go.getBoardState() for full details
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
19
markdown/bitburner.goopponent.md
Normal file
19
markdown/bitburner.goopponent.md
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GoOpponent](./bitburner.goopponent.md)
|
||||
|
||||
## GoOpponent type
|
||||
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type GoOpponent =
|
||||
| "Netburners"
|
||||
| "Slum Snakes"
|
||||
| "The Black Hand"
|
||||
| "Tetrads"
|
||||
| "Daedalus"
|
||||
| "Illuminati"
|
||||
| "????????????";
|
||||
```
|
||||
11
markdown/bitburner.graftingtask.augmentation.md
Normal file
11
markdown/bitburner.graftingtask.augmentation.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md) > [augmentation](./bitburner.graftingtask.augmentation.md)
|
||||
|
||||
## GraftingTask.augmentation property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
augmentation: string;
|
||||
```
|
||||
11
markdown/bitburner.graftingtask.cyclesworked.md
Normal file
11
markdown/bitburner.graftingtask.cyclesworked.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md) > [cyclesWorked](./bitburner.graftingtask.cyclesworked.md)
|
||||
|
||||
## GraftingTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
||||
26
markdown/bitburner.graftingtask.md
Normal file
26
markdown/bitburner.graftingtask.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md)
|
||||
|
||||
## GraftingTask interface
|
||||
|
||||
Faction Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface GraftingTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current grafting status
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
|
||||
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
|
||||
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |
|
||||
|
||||
11
markdown/bitburner.graftingtask.type.md
Normal file
11
markdown/bitburner.graftingtask.type.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md) > [type](./bitburner.graftingtask.type.md)
|
||||
|
||||
## GraftingTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "GRAFTING";
|
||||
```
|
||||
33
markdown/bitburner.hackingformulas.growamount.md
Normal file
33
markdown/bitburner.hackingformulas.growamount.md
Normal file
@@ -0,0 +1,33 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [HackingFormulas](./bitburner.hackingformulas.md) > [growAmount](./bitburner.hackingformulas.growamount.md)
|
||||
|
||||
## HackingFormulas.growAmount() method
|
||||
|
||||
Calculate the amount of money a grow action will leave a server with. Starting money is server.moneyAvailable. Note that when simulating the effect of [grow](./bitburner.ns.grow.md)<!-- -->, what matters is the state of the server and player when the grow \*finishes\*, not when it is started.
|
||||
|
||||
The growth amount depends both linearly \*and\* exponentially on threads; see [grow](./bitburner.ns.grow.md) for more details.
|
||||
|
||||
The inverse of this function is [formulas.hacking.growThreads](./bitburner.hackingformulas.growthreads.md)<!-- -->, although it rounds up to integer threads.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
growAmount(server: Server, player: Person, threads: number, cores?: number): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| server | [Server](./bitburner.server.md) | Server info, typically from [getServer](./bitburner.ns.getserver.md) |
|
||||
| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) |
|
||||
| threads | number | Number of threads to grow with. Can be fractional. |
|
||||
| cores | number | _(Optional)_ Number of cores on the computer that will execute grow. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
number
|
||||
|
||||
The amount of money after the calculated grow.
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
|
||||
## HackingFormulas.growPercent() method
|
||||
|
||||
Calculate the percent a server would grow to. Not exact due to limitations of mathematics. (Ex: 3.0 would grow the server to 300% of its current value.)
|
||||
Calculate the growth multiplier constant for a given server and threads.
|
||||
|
||||
The actual amount of money grown depends both linearly \*and\* exponentially on threads; this is only giving the exponential part that is used for the multiplier. See [grow](./bitburner.ns.grow.md) for more details.
|
||||
|
||||
As a result of the above, this multiplier does \*not\* depend on the amount of money on the server. Changing server.moneyAvailable and server.moneyMax will have no effect.
|
||||
|
||||
For the most common use-cases, you probably want either [formulas.hacking.growThreads](./bitburner.hackingformulas.growthreads.md) or [formulas.hacking.growAmount](./bitburner.hackingformulas.growamount.md) instead.
|
||||
|
||||
**Signature:**
|
||||
|
||||
@@ -17,7 +23,7 @@ growPercent(server: Server, threads: number, player: Person, cores?: number): nu
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| server | [Server](./bitburner.server.md) | Server info, typically from [getServer](./bitburner.ns.getserver.md) |
|
||||
| threads | number | Amount of thread. |
|
||||
| threads | number | Amount of threads. Can be fractional. |
|
||||
| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) |
|
||||
| cores | number | _(Optional)_ Number of cores on the computer that will execute grow. |
|
||||
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
## HackingFormulas.growThreads() method
|
||||
|
||||
Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable.
|
||||
Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable. Note that when simulating the effect of [grow](./bitburner.ns.grow.md)<!-- -->, what matters is the state of the server and player when the grow \*finishes\*, not when it is started.
|
||||
|
||||
The growth amount depends both linearly \*and\* exponentially on threads; see [grow](./bitburner.ns.grow.md) for more details.
|
||||
|
||||
The inverse of this function is [formulas.hacking.growAmount](./bitburner.hackingformulas.growamount.md)<!-- -->, although it can work with fractional threads.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ interface HackingFormulas
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | Calculate the percent a server would grow to. Not exact due to limitations of mathematics. (Ex: 3.0 would grow the server to 300% of its current value.) |
|
||||
| [growThreads(server, player, targetMoney, cores)](./bitburner.hackingformulas.growthreads.md) | Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable. |
|
||||
| [growAmount(server, player, threads, cores)](./bitburner.hackingformulas.growamount.md) | <p>Calculate the amount of money a grow action will leave a server with. Starting money is server.moneyAvailable. Note that when simulating the effect of [grow](./bitburner.ns.grow.md)<!-- -->, what matters is the state of the server and player when the grow \*finishes\*, not when it is started.</p><p>The growth amount depends both linearly \*and\* exponentially on threads; see [grow](./bitburner.ns.grow.md) for more details.</p><p>The inverse of this function is [formulas.hacking.growThreads](./bitburner.hackingformulas.growthreads.md)<!-- -->, although it rounds up to integer threads.</p> |
|
||||
| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | <p>Calculate the growth multiplier constant for a given server and threads.</p><p>The actual amount of money grown depends both linearly \*and\* exponentially on threads; this is only giving the exponential part that is used for the multiplier. See [grow](./bitburner.ns.grow.md) for more details.</p><p>As a result of the above, this multiplier does \*not\* depend on the amount of money on the server. Changing server.moneyAvailable and server.moneyMax will have no effect.</p><p>For the most common use-cases, you probably want either [formulas.hacking.growThreads](./bitburner.hackingformulas.growthreads.md) or [formulas.hacking.growAmount](./bitburner.hackingformulas.growamount.md) instead.</p> |
|
||||
| [growThreads(server, player, targetMoney, cores)](./bitburner.hackingformulas.growthreads.md) | <p>Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable. Note that when simulating the effect of [grow](./bitburner.ns.grow.md)<!-- -->, what matters is the state of the server and player when the grow \*finishes\*, not when it is started.</p><p>The growth amount depends both linearly \*and\* exponentially on threads; see [grow](./bitburner.ns.grow.md) for more details.</p><p>The inverse of this function is [formulas.hacking.growAmount](./bitburner.hackingformulas.growamount.md)<!-- -->, although it can work with fractional threads.</p> |
|
||||
| [growTime(server, player)](./bitburner.hackingformulas.growtime.md) | Calculate grow time. |
|
||||
| [hackChance(server, player)](./bitburner.hackingformulas.hackchance.md) | Calculate hack chance. (Ex: 0.25 would indicate a 25% chance of success.) |
|
||||
| [hackExp(server, player)](./bitburner.hackingformulas.hackexp.md) | Calculate hack exp for one thread. |
|
||||
|
||||
@@ -9,14 +9,14 @@ Get all infiltrations with difficulty, location and rewards.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getInfiltration(location: string): InfiltrationLocation;
|
||||
getInfiltration(location: LocationName | `${LocationName}`): InfiltrationLocation;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| location | string | |
|
||||
| location | [LocationName](./bitburner.locationname.md) \| \`${[LocationName](./bitburner.locationname.md)<!-- -->}\` | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
11
markdown/bitburner.infiltrationlocation.maxclearancelevel.md
Normal file
11
markdown/bitburner.infiltrationlocation.maxclearancelevel.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [maxClearanceLevel](./bitburner.infiltrationlocation.maxclearancelevel.md)
|
||||
|
||||
## InfiltrationLocation.maxClearanceLevel property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
maxClearanceLevel: number;
|
||||
```
|
||||
@@ -17,5 +17,7 @@ interface InfiltrationLocation
|
||||
| --- | --- | --- | --- |
|
||||
| [difficulty](./bitburner.infiltrationlocation.difficulty.md) | | number | |
|
||||
| [location](./bitburner.infiltrationlocation.location.md) | | [ILocation](./bitburner.ilocation.md) | |
|
||||
| [maxClearanceLevel](./bitburner.infiltrationlocation.maxclearancelevel.md) | | number | |
|
||||
| [reward](./bitburner.infiltrationlocation.reward.md) | | [InfiltrationReward](./bitburner.infiltrationreward.md) | |
|
||||
| [startingSecurityLevel](./bitburner.infiltrationlocation.startingsecuritylevel.md) | | number | |
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [startingSecurityLevel](./bitburner.infiltrationlocation.startingsecuritylevel.md)
|
||||
|
||||
## InfiltrationLocation.startingSecurityLevel property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
startingSecurityLevel: number;
|
||||
```
|
||||
@@ -39,18 +39,22 @@
|
||||
| [CodingContract](./bitburner.codingcontract.md) | Coding Contract API |
|
||||
| [CompanyPositionInfo](./bitburner.companypositioninfo.md) | Company position requirements and salary. |
|
||||
| [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) | Player must have at least this much reputation with this company. |
|
||||
| [CompanyWorkTask](./bitburner.companyworktask.md) | Company Work |
|
||||
| [CorpConstants](./bitburner.corpconstants.md) | Corporation related constants |
|
||||
| [CorpIndustryData](./bitburner.corpindustrydata.md) | Data for an individual industry |
|
||||
| [CorpMaterialConstantData](./bitburner.corpmaterialconstantdata.md) | Corporation material information |
|
||||
| [Corporation](./bitburner.corporation.md) | Corporation API |
|
||||
| [CorporationInfo](./bitburner.corporationinfo.md) | General info about a corporation |
|
||||
| [CorpProductData](./bitburner.corpproductdata.md) | Product rating information |
|
||||
| [CreateProgramWorkTask](./bitburner.createprogramworktask.md) | Create Program |
|
||||
| [CrimeStats](./bitburner.crimestats.md) | Data representing the internal values of a crime. |
|
||||
| [CrimeTask](./bitburner.crimetask.md) | Crime |
|
||||
| [Division](./bitburner.division.md) | Corporation division |
|
||||
| [EmployedByRequirement](./bitburner.employedbyrequirement.md) | Player must be working for this company. |
|
||||
| [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. |
|
||||
| [EveryRequirement](./bitburner.everyrequirement.md) | All sub-conditions must be satisfied. |
|
||||
| [Export](./bitburner.export.md) | Export order for a material |
|
||||
| [FactionWorkTask](./bitburner.factionworktask.md) | Faction Work |
|
||||
| [FileRequirement](./bitburner.filerequirement.md) | Player must have a specific Literature or Message file on their home computer. |
|
||||
| [Formulas](./bitburner.formulas.md) | Formulas API |
|
||||
| [Fragment](./bitburner.fragment.md) | |
|
||||
@@ -60,11 +64,14 @@
|
||||
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
|
||||
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
|
||||
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
| [GangMemberInstall](./bitburner.gangmemberinstall.md) | |
|
||||
| [GangOtherInfo](./bitburner.gangotherinfo.md) | |
|
||||
| [GangOtherInfoObject](./bitburner.gangotherinfoobject.md) | |
|
||||
| [GangTaskStats](./bitburner.gangtaskstats.md) | Object representing data representing a gang member task. |
|
||||
| [GangTerritory](./bitburner.gangterritory.md) | |
|
||||
| [Go](./bitburner.go.md) | IPvGO api |
|
||||
| [Grafting](./bitburner.grafting.md) | Grafting API |
|
||||
| [GraftingTask](./bitburner.graftingtask.md) | Faction Work |
|
||||
| [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
|
||||
| [HackingMultipliers](./bitburner.hackingmultipliers.md) | Hack related multipliers. |
|
||||
| [Hacknet](./bitburner.hacknet.md) | Hacknet API |
|
||||
@@ -126,6 +133,7 @@
|
||||
| [StockMarketConstants](./bitburner.stockmarketconstants.md) | Constants used for the stockmarket game mechanic. |
|
||||
| [StockOrder](./bitburner.stockorder.md) | <p>Return value of [getOrders](./bitburner.tix.getorders.md)</p><p>Keys are stock symbols, properties are arrays of [StockOrderObject](./bitburner.stockorderobject.md)</p> |
|
||||
| [StockOrderObject](./bitburner.stockorderobject.md) | Value in map of [StockOrder](./bitburner.stockorder.md) |
|
||||
| [StudyTask](./bitburner.studytask.md) | Study |
|
||||
| [TailProperties](./bitburner.tailproperties.md) | |
|
||||
| [TIX](./bitburner.tix.md) | Stock market API |
|
||||
| [UserInterface](./bitburner.userinterface.md) | User Interface API. |
|
||||
@@ -149,11 +157,12 @@
|
||||
| [CorpUnlockName](./bitburner.corpunlockname.md) | |
|
||||
| [CorpUpgradeName](./bitburner.corpupgradename.md) | |
|
||||
| [FilenameOrPID](./bitburner.filenameorpid.md) | |
|
||||
| [GoOpponent](./bitburner.goopponent.md) | |
|
||||
| [NSEnums](./bitburner.nsenums.md) | |
|
||||
| [PlayerRequirement](./bitburner.playerrequirement.md) | Structured interface to requirements for joining a faction or company. For fields with numerical value > 0, the player must have at least this value. For fields with numerical value <<!-- -->= 0, the player must have at most this value. For "not", the sub-condition must be failed instead of passed. For "someCondition", at least one sub-condition must be passed. |
|
||||
| [PortData](./bitburner.portdata.md) | |
|
||||
| [ReactNode](./bitburner.reactnode.md) | <p>A stand-in for the real React.ReactNode. A [ReactElement](./bitburner.reactelement.md) is rendered dynamically with React. number and string are displayed directly. boolean, null, and undefined are ignored and not rendered. An array of ReactNodes will display all members of that array sequentially.</p><p>Use React.createElement to make the ReactElement type, see [creating an element without jsx](https://react.dev/reference/react/createElement#creating-an-element-without-jsx) from the official React documentation.</p> |
|
||||
| [ScriptArg](./bitburner.scriptarg.md) | |
|
||||
| [SimpleOpponentStats](./bitburner.simpleopponentstats.md) | |
|
||||
| [SleeveBladeburnerTask](./bitburner.sleevebladeburnertask.md) | |
|
||||
| [SleeveClassTask](./bitburner.sleeveclasstask.md) | |
|
||||
| [SleeveCompanyTask](./bitburner.sleevecompanytask.md) | |
|
||||
@@ -164,4 +173,5 @@
|
||||
| [SleeveSupportTask](./bitburner.sleevesupporttask.md) | |
|
||||
| [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) | |
|
||||
| [SleeveTask](./bitburner.sleevetask.md) | Object representing a sleeve current task. |
|
||||
| [Task](./bitburner.task.md) | Task |
|
||||
|
||||
|
||||
11
markdown/bitburner.moneysource.gang_expenses.md
Normal file
11
markdown/bitburner.moneysource.gang_expenses.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [gang\_expenses](./bitburner.moneysource.gang_expenses.md)
|
||||
|
||||
## MoneySource.gang\_expenses property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
gang_expenses: number;
|
||||
```
|
||||
@@ -22,6 +22,7 @@ interface MoneySource
|
||||
| [codingcontract](./bitburner.moneysource.codingcontract.md) | | number | |
|
||||
| [corporation](./bitburner.moneysource.corporation.md) | | number | |
|
||||
| [crime](./bitburner.moneysource.crime.md) | | number | |
|
||||
| [gang\_expenses](./bitburner.moneysource.gang_expenses.md) | | number | |
|
||||
| [gang](./bitburner.moneysource.gang.md) | | number | |
|
||||
| [hacking](./bitburner.moneysource.hacking.md) | | number | |
|
||||
| [hacknet\_expenses](./bitburner.moneysource.hacknet_expenses.md) | | number | |
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface NetscriptPort
|
||||
| [clear()](./bitburner.netscriptport.clear.md) | Empties all data from the port. |
|
||||
| [empty()](./bitburner.netscriptport.empty.md) | Check if the port is empty. |
|
||||
| [full()](./bitburner.netscriptport.full.md) | Check if the port is full. |
|
||||
| [nextWrite()](./bitburner.netscriptport.nextwrite.md) | Sleeps until the port is written to. |
|
||||
| [nextWrite()](./bitburner.netscriptport.nextwrite.md) | Waits until the port is written to. |
|
||||
| [peek()](./bitburner.netscriptport.peek.md) | Retrieve the first element from the port without removing it. |
|
||||
| [read()](./bitburner.netscriptport.read.md) | Shift an element out of the port. |
|
||||
| [tryWrite(value)](./bitburner.netscriptport.trywrite.md) | Attempt to write data to the port. |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## NetscriptPort.nextWrite() method
|
||||
|
||||
Sleeps until the port is written to.
|
||||
Waits until the port is written to.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ Retrieve the first element from the port without removing it.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
peek(): PortData;
|
||||
peek(): any;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[PortData](./bitburner.portdata.md)
|
||||
any
|
||||
|
||||
the data read
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ Shift an element out of the port.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
read(): PortData;
|
||||
read(): any;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[PortData](./bitburner.portdata.md)
|
||||
any
|
||||
|
||||
the data read.
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ Attempt to write data to the port.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
tryWrite(value: string | number): boolean;
|
||||
tryWrite(value: any): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| value | string \| number | |
|
||||
| value | any | Data to write, it's cloned with structuredClone(). |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,18 +9,18 @@ Write data to a port.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
write(value: string | number): PortData | null;
|
||||
write(value: any): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| value | string \| number | |
|
||||
| value | any | Data to write, it's cloned with structuredClone(). |
|
||||
|
||||
**Returns:**
|
||||
|
||||
[PortData](./bitburner.portdata.md) \| null
|
||||
any
|
||||
|
||||
The data popped off the queue if it was full.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Arguments passed into the script.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
readonly args: (string | number | boolean)[];
|
||||
readonly args: ScriptArg[];
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
@@ -9,7 +9,7 @@ Add callback function when the script dies
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
atExit(f: () => void): void;
|
||||
atExit(f: () => void, id?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -17,6 +17,7 @@ atExit(f: () => void): void;
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| f | () => void | |
|
||||
| id | string | _(Optional)_ |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -28,3 +28,5 @@ RAM cost: 0 GB
|
||||
|
||||
Logging can be disabled for all functions by passing `ALL` as the argument.
|
||||
|
||||
For specific interfaces, use the form "namespace.functionName". (e.g. "ui.setTheme")
|
||||
|
||||
|
||||
@@ -9,12 +9,7 @@ Start another script on any server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
exec(
|
||||
script: string,
|
||||
hostname: string,
|
||||
threadOrOptions?: number | RunOptions,
|
||||
...args: (string | number | boolean)[]
|
||||
): number;
|
||||
exec(script: string, hostname: string, threadOrOptions?: number | RunOptions, ...args: ScriptArg[]): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -24,7 +19,7 @@ exec(
|
||||
| script | string | Filename of script to execute. This file must already exist on the target server. |
|
||||
| hostname | string | Hostname of the <code>target server</code> on which to execute the script. |
|
||||
| threadOrOptions | number \| [RunOptions](./bitburner.runoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [RunOptions](./bitburner.runoptions.md) object. Threads defaults to 1. |
|
||||
| args | (string \| number \| boolean)\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument threadOrOptions must be filled in with a value. |
|
||||
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument threadOrOptions must be filled in with a value. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@ RAM cost: 0 GB
|
||||
|
||||
Allows Unix-like flag parsing.
|
||||
|
||||
We support 2 forms:
|
||||
|
||||
- Short form: the flag contains only 1 character, e.g. -v.
|
||||
|
||||
- Long form: the flag contains more than 1 character, e.g. --version.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -38,21 +44,24 @@ export async function main(ns) {
|
||||
['server', 'foodnstuff'], // a default string means this flag is a string
|
||||
['exclude', []], // a default array means this flag is a default array of string
|
||||
['help', false], // a default boolean means this flag is a boolean
|
||||
['v', false], // short form
|
||||
]);
|
||||
ns.tprint(data);
|
||||
}
|
||||
|
||||
// [home ~/]> run example.js
|
||||
// {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false}
|
||||
// [home ~/]> run example.js --delay 3000
|
||||
// {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000}
|
||||
// [home ~/]> run example.js --delay 3000 --server harakiri-sushi
|
||||
// {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}
|
||||
// [home ~/]> run example.js --delay 3000 --server harakiri-sushi hello world
|
||||
// {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}
|
||||
// [home ~/]> run example.js --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b
|
||||
// {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]}
|
||||
// [home ~/]> run example.script --help
|
||||
// {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}
|
||||
// [home /]> run example.js
|
||||
// {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false,"v":false}
|
||||
// [home /]> run example.js --delay 3000
|
||||
// {"_":[],"delay":3000,"server":"foodnstuff","exclude":[],"help":false,"v":false}
|
||||
// [home /]> run example.js --delay 3000 --server harakiri-sushi
|
||||
// {"_":[],"delay":3000,"server":"harakiri-sushi","exclude":[],"help":false,"v":false}
|
||||
// [home /]> run example.js --delay 3000 --server harakiri-sushi hello world
|
||||
// {"_":["hello","world"],"delay":3000,"server":"harakiri-sushi","exclude":[],"help":false,"v":false}
|
||||
// [home /]> run example.js --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b
|
||||
// {"_":["hello","world"],"delay":3000,"server":"harakiri-sushi","exclude":["a","b"],"help":false,"v":false}
|
||||
// [home /]> run example.js --help
|
||||
// {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true,"v":false}
|
||||
// [home /]> run example.js -v
|
||||
// {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false,"v":true}
|
||||
```
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Returns an object containing the Player’s hacking related multipliers. These m
|
||||
|
||||
```js
|
||||
const mults = ns.getHackingMultipliers();
|
||||
print(`chance: ${mults.chance}`);
|
||||
print(`growthL ${mults.growth}`);
|
||||
ns.tprint(`chance: ${mults.chance}`);
|
||||
ns.tprint(`growth: ${mults.growth}`);
|
||||
```
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ Returns the cost to purchase a server with the specified amount of ram.
|
||||
```js
|
||||
const ram = 2 ** 20;
|
||||
const cost = ns.getPurchasedServerCost(ram);
|
||||
ns.tprint(`A purchased server with ${ns.formatRam(ram)} costs ${ns.formatMoney(cost)}`);
|
||||
ns.tprint(`A purchased server with ${ns.formatRam(ram)} costs $${ns.formatNumber(cost)}`);
|
||||
```
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ The most recently killed script is the first element in the array. Note that the
|
||||
## Example
|
||||
|
||||
|
||||
```ts
|
||||
```js
|
||||
let recentScripts = ns.getRecentScripts();
|
||||
let mostRecent = recentScripts.shift()
|
||||
let mostRecent = recentScripts.shift();
|
||||
if (mostRecent)
|
||||
ns.tprint(mostRecent.logs.join('\n'))
|
||||
ns.tprint(mostRecent.logs.join('\n'));
|
||||
```
|
||||
|
||||
|
||||
@@ -26,6 +26,6 @@ RAM cost: 1 GB
|
||||
const resetInfo = ns.getResetInfo();
|
||||
const lastAugReset = resetInfo.lastAugReset;
|
||||
ns.tprint(`The last augmentation reset was: ${new Date(lastAugReset)}`);
|
||||
ns.tprint(`It has been ${Date.now() - lastAugReset}ms since the last augmentation reset.`);
|
||||
ns.tprint(`It has been ${Date.now() - lastAugReset} ms since the last augmentation reset.`);
|
||||
```
|
||||
|
||||
|
||||
@@ -9,11 +9,7 @@ Get general info about a running script.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getRunningScript(
|
||||
filename?: FilenameOrPID,
|
||||
hostname?: string,
|
||||
...args: (string | number | boolean)[]
|
||||
): RunningScript | null;
|
||||
getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: ScriptArg[]): RunningScript | null;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -22,7 +18,7 @@ getRunningScript(
|
||||
| --- | --- | --- |
|
||||
| filename | [FilenameOrPID](./bitburner.filenameorpid.md) | _(Optional)_ Optional. Filename or PID of the script. |
|
||||
| hostname | string | _(Optional)_ Hostname of target server. Optional, defaults to the server the calling script is running on. |
|
||||
| args | (string \| number \| boolean)\[\] | Arguments to specify/identify the script. Optional, when looking for scripts run without arguments. |
|
||||
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Arguments to specify/identify the script. Optional, when looking for scripts run without arguments. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Get the exp gain of a script.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getScriptExpGain(script: string, host: string, ...args: (string | number | boolean)[]): number;
|
||||
getScriptExpGain(script: string, host: string, ...args: ScriptArg[]): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -18,7 +18,7 @@ getScriptExpGain(script: string, host: string, ...args: (string | number | boole
|
||||
| --- | --- | --- |
|
||||
| script | string | Filename of script. |
|
||||
| host | string | Server on which script is running. |
|
||||
| args | (string \| number \| boolean)\[\] | Arguments that the script is running with. |
|
||||
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Arguments that the script is running with. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Get the income of a script.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getScriptIncome(script: string, host: string, ...args: (string | number | boolean)[]): number;
|
||||
getScriptIncome(script: string, host: string, ...args: ScriptArg[]): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -18,7 +18,7 @@ getScriptIncome(script: string, host: string, ...args: (string | number | boolea
|
||||
| --- | --- | --- |
|
||||
| script | string | Filename of script. |
|
||||
| host | string | Server on which script is running. |
|
||||
| args | (string \| number \| boolean)\[\] | Arguments that the script is running with. |
|
||||
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Arguments that the script is running with. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Get all the logs of a script.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getScriptLogs(fn?: FilenameOrPID, host?: string, ...args: (string | number | boolean)[]): string[];
|
||||
getScriptLogs(fn?: FilenameOrPID, host?: string, ...args: ScriptArg[]): string[];
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -18,7 +18,7 @@ getScriptLogs(fn?: FilenameOrPID, host?: string, ...args: (string | number | boo
|
||||
| --- | --- | --- |
|
||||
| fn | [FilenameOrPID](./bitburner.filenameorpid.md) | _(Optional)_ Optional. Filename or PID of script to get logs from. |
|
||||
| host | string | _(Optional)_ Optional. Hostname of the server that the script is on. |
|
||||
| args | (string \| number \| boolean)\[\] | Arguments to identify which scripts to get logs for. |
|
||||
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Arguments to identify which scripts to get logs for. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user