mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
Compare commits
572 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faf8389bef | ||
|
|
50919a88cd | ||
|
|
4860d6dc83 | ||
|
|
c59a267437 | ||
|
|
f9fd7a48f8 | ||
|
|
07b12ca6fb | ||
|
|
707a68dae9 | ||
|
|
1f46d69430 | ||
|
|
f2fa7a3c2d | ||
|
|
100ac2db95 | ||
|
|
338953fa1a | ||
|
|
de8e5ef441 | ||
|
|
c06087c634 | ||
|
|
8587625bd6 | ||
|
|
c5fb744a39 | ||
|
|
d7cd5b0d96 | ||
|
|
c445df4168 | ||
|
|
f8cba0ddc8 | ||
|
|
e3a181faf2 | ||
|
|
f65e546c32 | ||
|
|
772317a4f1 | ||
|
|
225de0faf6 | ||
|
|
0dbb067eae | ||
|
|
0d02ce6308 | ||
|
|
042189b187 | ||
|
|
52ca4c177a | ||
|
|
b38e411cd0 | ||
|
|
c9d40ccf95 | ||
|
|
438ae51fcd | ||
|
|
2747bf4439 | ||
|
|
dd720897e8 | ||
|
|
449df63dd8 | ||
|
|
f0161367af | ||
|
|
ac0bcbca8e | ||
|
|
914b06ec88 | ||
|
|
d5561abd46 | ||
|
|
53e3547d87 | ||
|
|
501cabfdc5 | ||
|
|
fff1de63d3 | ||
|
|
23b21e63a0 | ||
|
|
88db255f29 | ||
|
|
dfae337d26 | ||
|
|
7655b91e2a | ||
|
|
0368456d1e | ||
|
|
8191716562 | ||
|
|
3ceed8cf24 | ||
|
|
69ed320b93 | ||
|
|
8e0b5e3ecd | ||
|
|
ea3a1e5a2a | ||
|
|
1372c28a1b | ||
|
|
b123d191c0 | ||
|
|
82c963c04e | ||
|
|
df37f884ed | ||
|
|
dfabc0ac11 | ||
|
|
6c3618cb65 | ||
|
|
6d8df6744e | ||
|
|
bdef14b029 | ||
|
|
38923af436 | ||
|
|
057a229759 | ||
|
|
5c57bd43f6 | ||
|
|
8c851b577a | ||
|
|
3ac26594db | ||
|
|
409fa29b65 | ||
|
|
74ee7f371d | ||
|
|
62c19c9078 | ||
|
|
f1592a77fb | ||
|
|
f8607ce73e | ||
|
|
d0214c1fed | ||
|
|
4fb1dbf2e3 | ||
|
|
1e0e9f7bd7 | ||
|
|
1819e5a98a | ||
|
|
a2d75ae10c | ||
|
|
cd9fad06d0 | ||
|
|
d4eab92ed0 | ||
|
|
93c833a211 | ||
|
|
29aca108fb | ||
|
|
01cb0cca81 | ||
|
|
a1ec54ff90 | ||
|
|
52c82f026c | ||
|
|
b80cc31cb0 | ||
|
|
a6be7ecc3e | ||
|
|
1a07399312 | ||
|
|
8cfb355ca2 | ||
|
|
c5248fabb3 | ||
|
|
d53b87b8ce | ||
|
|
ca51e2144f | ||
|
|
c8667b5194 | ||
|
|
4486d7d454 | ||
|
|
7f812f56d9 | ||
|
|
4810a9004d | ||
|
|
b9b4ee23fe | ||
|
|
dd4b548917 | ||
|
|
5aa08f4123 | ||
|
|
8428264f05 | ||
|
|
4096ce4a9d | ||
|
|
1dcde649be | ||
|
|
2e0242ccbf | ||
|
|
59d8e1f979 | ||
|
|
8707dc7079 | ||
|
|
e3e1770439 | ||
|
|
c6ec27781b | ||
|
|
50f41e79e6 | ||
|
|
2637653d29 | ||
|
|
2b7464ebb7 | ||
|
|
b402cc7f6e | ||
|
|
2189c5b663 | ||
|
|
f3aed87fa4 | ||
|
|
31ed5d8f64 | ||
|
|
38366e45db | ||
|
|
351d4151bb | ||
|
|
bc0791840f | ||
|
|
bf1a2b56ba | ||
|
|
8f3da16ecf | ||
|
|
b578e09986 | ||
|
|
d823b5f28f | ||
|
|
7a0fdb9ce9 | ||
|
|
1b41e3326e | ||
|
|
72d9770a8e | ||
|
|
5c5cc9708d | ||
|
|
636fc7cda0 | ||
|
|
a098289856 | ||
|
|
383e56e9c8 | ||
|
|
91243f4742 | ||
|
|
04f2cfe522 | ||
|
|
0fc95e6215 | ||
|
|
9673b6f31d | ||
|
|
3c3f482e7b | ||
|
|
5d7d72a3e2 | ||
|
|
cc4f07d037 | ||
|
|
6eb8b2adf9 | ||
|
|
aaf1ad4ae5 | ||
|
|
ab5a2a8297 | ||
|
|
f98968f8b2 | ||
|
|
1b7a0224c5 | ||
|
|
26ab62eea6 | ||
|
|
9f9ce40ef0 | ||
|
|
39e6c5ca35 | ||
|
|
39c7a7781a | ||
|
|
f674d2d253 | ||
|
|
b27bb36a95 | ||
|
|
329221a974 | ||
|
|
952ea89777 | ||
|
|
5aff5fc944 | ||
|
|
d181ac4104 | ||
|
|
e583b46b16 | ||
|
|
8b42703f95 | ||
|
|
91d9549999 | ||
|
|
a29ffead78 | ||
|
|
dd3ab9ca48 | ||
|
|
c7657e5ec8 | ||
|
|
0842aba6cf | ||
|
|
8b33f72703 | ||
|
|
e9fd5f46eb | ||
|
|
8aae2c9b7f | ||
|
|
33e4e31099 | ||
|
|
b13f146bc3 | ||
|
|
90ca9407d5 | ||
|
|
7c846abb65 | ||
|
|
58dd450aca | ||
|
|
e3a9f9edab | ||
|
|
5607561c50 | ||
|
|
169d3e6c77 | ||
|
|
1087db9f33 | ||
|
|
6a9f6c05ec | ||
|
|
a4eddb4691 | ||
|
|
73adc71965 | ||
|
|
eb137455f5 | ||
|
|
a16cb745c5 | ||
|
|
3dd818cb7b | ||
|
|
23683d3482 | ||
|
|
3b8bdb7449 | ||
|
|
072653674e | ||
|
|
07b00bc377 | ||
|
|
f28ddd3b3f | ||
|
|
fd93c6d338 | ||
|
|
8f77f720e6 | ||
|
|
d99b03d12e | ||
|
|
2d949c076b | ||
|
|
13e68ba48e | ||
|
|
deb6d6cc0a | ||
|
|
3eedd9df88 | ||
|
|
ed86577d6c | ||
|
|
16c51e8e8e | ||
|
|
87d6c18254 | ||
|
|
12ba68a375 | ||
|
|
4861ac4153 | ||
|
|
b33af9df20 | ||
|
|
fcb876695d | ||
|
|
0bddb7d349 | ||
|
|
6458440193 | ||
|
|
ea03889082 | ||
|
|
693c6480a0 | ||
|
|
c056ef2854 | ||
|
|
eee72aa8d2 | ||
|
|
e0aaa383a4 | ||
|
|
7805b72457 | ||
|
|
88151efa61 | ||
|
|
795f8b4d2b | ||
|
|
bfdfee2a68 | ||
|
|
d2d6c33fc8 | ||
|
|
dce7217fc5 | ||
|
|
6363c704db | ||
|
|
9ea66e8743 | ||
|
|
7c599f2005 | ||
|
|
fba2265cce | ||
|
|
9ce8bdd29b | ||
|
|
35cfa9492e | ||
|
|
ed4d4d091c | ||
|
|
a97d2a93cb | ||
|
|
dbf8c788e0 | ||
|
|
76d67fdba5 | ||
|
|
f2141dd83d | ||
|
|
21ac94dbb3 | ||
|
|
06ec11a107 | ||
|
|
c2e5c9f371 | ||
|
|
7260d5fe35 | ||
|
|
366bffad85 | ||
|
|
1c7b0ab9a3 | ||
|
|
ce0fb7a383 | ||
|
|
91ac40efd0 | ||
|
|
e83c38b5fb | ||
|
|
50a85b61e2 | ||
|
|
64dea97e3c | ||
|
|
d6c1f3bfca | ||
|
|
6b59a58ea3 | ||
|
|
17b11f107f | ||
|
|
7baacf4e1b | ||
|
|
7f3f5c7648 | ||
|
|
f2bdf00aba | ||
|
|
e7e1e82394 | ||
|
|
ea0be338e1 | ||
|
|
b2b682fa04 | ||
|
|
41593e0dce | ||
|
|
79eb2f7e0b | ||
|
|
5021013cb7 | ||
|
|
c1c7131545 | ||
|
|
81e3f2afd1 | ||
|
|
f01b12a56a | ||
|
|
26106fa71d | ||
|
|
4be5e45740 | ||
|
|
94d695bb12 | ||
|
|
1830287a6e | ||
|
|
7a9e8936ee | ||
|
|
4183ed6f2b | ||
|
|
ede6be3d0d | ||
|
|
2d269c7a4e | ||
|
|
d873f7279b | ||
|
|
dbe36fd6b7 | ||
|
|
f2ccc63b2d | ||
|
|
1427993a25 | ||
|
|
0b71a83cfe | ||
|
|
bd375851a4 | ||
|
|
8ccb128e6f | ||
|
|
a6aebd4a29 | ||
|
|
56e540802b | ||
|
|
99f1e67224 | ||
|
|
bb2f8e883c | ||
|
|
9a1437559a | ||
|
|
d30edc7f59 | ||
|
|
009bae5870 | ||
|
|
b57ac45698 | ||
|
|
41a7109baa | ||
|
|
65d0877edc | ||
|
|
ddd0eaaf5c | ||
|
|
63891351be | ||
|
|
60749eefa7 | ||
|
|
ee177393fa | ||
|
|
4ec021c8f0 | ||
|
|
e9886cc6bc | ||
|
|
5dc9ac040a | ||
|
|
25f78f2b30 | ||
|
|
df265df9ce | ||
|
|
388a3f56c3 | ||
|
|
3fd904ff87 | ||
|
|
6641ca9c73 | ||
|
|
517066a710 | ||
|
|
d372166c8b | ||
|
|
00b3cb61f4 | ||
|
|
8be201cd93 | ||
|
|
ab0ed5d6a4 | ||
|
|
87bf23b6f4 | ||
|
|
afdac4e9cc | ||
|
|
e60996b86c | ||
|
|
08a4a1649f | ||
|
|
3df0fd3945 | ||
|
|
14532cd0a8 | ||
|
|
f72d4b89d4 | ||
|
|
53ce11c33a | ||
|
|
302af48be4 | ||
|
|
6d90025370 | ||
|
|
e5c4c8f64b | ||
|
|
9c19ddf6a7 | ||
|
|
cbfdfa5753 | ||
|
|
3120d97cfa | ||
|
|
6dc7dc42c5 | ||
|
|
3255768259 | ||
|
|
7215e73f41 | ||
|
|
e4345ebf68 | ||
|
|
2267845e2d | ||
|
|
b95261d905 | ||
|
|
6ec7fcb9fa | ||
|
|
82f6bbee13 | ||
|
|
565e7677f8 | ||
|
|
d1abe27484 | ||
|
|
7710ae5564 | ||
|
|
e521415273 | ||
|
|
61dde4cfac | ||
|
|
fcbf8a3824 | ||
|
|
f678574a6c | ||
|
|
8b355c365e | ||
|
|
2bbb767575 | ||
|
|
06acccdfe1 | ||
|
|
3b99da8474 | ||
|
|
92e8b42d18 | ||
|
|
d1696148c4 | ||
|
|
890b1df593 | ||
|
|
3ed5aa8045 | ||
|
|
2f9eb324b4 | ||
|
|
8c2b969026 | ||
|
|
29f1bed823 | ||
|
|
05ed3f5461 | ||
|
|
69fda94808 | ||
|
|
a9cf635a84 | ||
|
|
efc3992c78 | ||
|
|
76890ad1b9 | ||
|
|
3a21beb708 | ||
|
|
a76f67ade5 | ||
|
|
24f0c9e65d | ||
|
|
e6b84a73b2 | ||
|
|
b6df183953 | ||
|
|
f5f206561c | ||
|
|
1ea8c62d4f | ||
|
|
bc7f94ddda | ||
|
|
1dcc17c4fb | ||
|
|
6d79561859 | ||
|
|
b8b3897e64 | ||
|
|
b2add6c26b | ||
|
|
24c7fb2b92 | ||
|
|
1f6954b393 | ||
|
|
790ffeb8a1 | ||
|
|
555216a39b | ||
|
|
aad4024e0f | ||
|
|
db64d9869c | ||
|
|
02605090df | ||
|
|
853125009b | ||
|
|
b739d60490 | ||
|
|
d5201885aa | ||
|
|
0ff110492e | ||
|
|
4eb1914c79 | ||
|
|
47f20c666e | ||
|
|
da58c1df9f | ||
|
|
c723c7ecd2 | ||
|
|
d45d6c8f3a | ||
|
|
cbb3563556 | ||
|
|
eec9fbf997 | ||
|
|
a9b0dd0d3f | ||
|
|
1dafa03a71 | ||
|
|
7c1fa4e228 | ||
|
|
21191e0b8d | ||
|
|
1368e468bb | ||
|
|
59498f780a | ||
|
|
733f04c343 | ||
|
|
87d8f67df1 | ||
|
|
2265f797c4 | ||
|
|
5e5e2c60aa | ||
|
|
8ba5199e54 | ||
|
|
069d76df25 | ||
|
|
160682f25a | ||
|
|
eb002d655a | ||
|
|
5bb304caff | ||
|
|
504a8a4be5 | ||
|
|
ecc650576e | ||
|
|
b3f9380ebd | ||
|
|
2b5cc03e79 | ||
|
|
b122cebc98 | ||
|
|
5b79712817 | ||
|
|
6fb5565b08 | ||
|
|
3e4e26ac8c | ||
|
|
b7011407fd | ||
|
|
84c77c1d2c | ||
|
|
f4ea1ae970 | ||
|
|
cdd85c09e1 | ||
|
|
659211e1ff | ||
|
|
fb5d374279 | ||
|
|
c6843b231a | ||
|
|
196086cc13 | ||
|
|
36fd3c5d68 | ||
|
|
b14432329a | ||
|
|
da0cc6d8f1 | ||
|
|
c59806c87d | ||
|
|
6d94ee0c2c | ||
|
|
217b94d0a0 | ||
|
|
e8b4d15078 | ||
|
|
c4bd6d8e11 | ||
|
|
6c5842d2e7 | ||
|
|
b0929e3cff | ||
|
|
795df0ed69 | ||
|
|
ae6f8c5ee7 | ||
|
|
63f7775804 | ||
|
|
81e291ef6a | ||
|
|
aafc311759 | ||
|
|
99f3566e52 | ||
|
|
9e86131625 | ||
|
|
dc21a5b87b | ||
|
|
9b64551197 | ||
|
|
2e9a42d74c | ||
|
|
2804b6ae56 | ||
|
|
d4bf6100a3 | ||
|
|
3436873373 | ||
|
|
1cca819f87 | ||
|
|
3ca762d8cf | ||
|
|
55d386a504 | ||
|
|
88666ec3fa | ||
|
|
33e918fc49 | ||
|
|
e8e2760c73 | ||
|
|
e16fba2418 | ||
|
|
c080f367b8 | ||
|
|
1b680431b6 | ||
|
|
c38992be8d | ||
|
|
361c3d3469 | ||
|
|
5718800b91 | ||
|
|
6ef99e138c | ||
|
|
3c67da02f3 | ||
|
|
9346979e2b | ||
|
|
2e2bd7441a | ||
|
|
9292484ed0 | ||
|
|
abc61b820c | ||
|
|
a1af0318d8 | ||
|
|
b05645a61c | ||
|
|
43aba18b77 | ||
|
|
52f2e52456 | ||
|
|
0a63de4539 | ||
|
|
16431f1031 | ||
|
|
2da9f87031 | ||
|
|
91c7811a36 | ||
|
|
d7f9cb8cec | ||
|
|
f9499d3259 | ||
|
|
a92d3238be | ||
|
|
9e9a1ca882 | ||
|
|
89bc702ef2 | ||
|
|
53a8cbe9bd | ||
|
|
e1e032b61f | ||
|
|
db9b0a8ec8 | ||
|
|
3926913790 | ||
|
|
2e133bcf0a | ||
|
|
889751490f | ||
|
|
d59601f848 | ||
|
|
cd4c98d942 | ||
|
|
c50c92f9b5 | ||
|
|
2726420709 | ||
|
|
07d449afc2 | ||
|
|
ad57f3dc73 | ||
|
|
ac79d0aea4 | ||
|
|
4836617745 | ||
|
|
ce0de40e59 | ||
|
|
61e962ec12 | ||
|
|
8ef227595a | ||
|
|
4e022c68e9 | ||
|
|
632e1f70f3 | ||
|
|
687682fcbd | ||
|
|
ab24e4865e | ||
|
|
a48d91b4cd | ||
|
|
4991709772 | ||
|
|
e3a0caf50f | ||
|
|
5b38ee3cfb | ||
|
|
a8f764bb8c | ||
|
|
4d80813707 | ||
|
|
de9fb24156 | ||
|
|
c1e3a170ab | ||
|
|
e5b4dd8e90 | ||
|
|
50bc9496ec | ||
|
|
1b42b51e5f | ||
|
|
7b8e486e3a | ||
|
|
dfdb940aa6 | ||
|
|
aae03982ee | ||
|
|
72f7e9644c | ||
|
|
e9623340af | ||
|
|
3437a0a730 | ||
|
|
7d6947ee01 | ||
|
|
e117548895 | ||
|
|
4460bf1613 | ||
|
|
154f467935 | ||
|
|
11ba8c91be | ||
|
|
7e474da3fe | ||
|
|
dea8abef1d | ||
|
|
cdeabfec0e | ||
|
|
eb77bf352c | ||
|
|
c845fb4203 | ||
|
|
5f696aba72 | ||
|
|
69a9448e47 | ||
|
|
5dfd5dc91c | ||
|
|
f2708e6772 | ||
|
|
ac3ed65e55 | ||
|
|
445fbd59c7 | ||
|
|
12114f0146 | ||
|
|
172998bef5 | ||
|
|
246e088365 | ||
|
|
2eaa33c9f3 | ||
|
|
638e0e8a13 | ||
|
|
769aad8ead | ||
|
|
d5e47a7180 | ||
|
|
d86986555c | ||
|
|
394a286646 | ||
|
|
1d046d7d87 | ||
|
|
5e916ee3bd | ||
|
|
b326bd26bc | ||
|
|
7e6a0bbf56 | ||
|
|
3cdb73be6c | ||
|
|
d195b00ab6 | ||
|
|
4c88ab7794 | ||
|
|
c915cd06d8 | ||
|
|
30af70c4ab | ||
|
|
14317628e6 | ||
|
|
5a15df9ce7 | ||
|
|
63c5387cfe | ||
|
|
6eba92b36c | ||
|
|
d64ce5271e | ||
|
|
ed821617c0 | ||
|
|
35fa4a4117 | ||
|
|
0306397f53 | ||
|
|
6b0c4471a6 | ||
|
|
2af57cb01e | ||
|
|
beaa60c967 | ||
|
|
d01d75606a | ||
|
|
aa7cf7469e | ||
|
|
133d80749d | ||
|
|
fa1dd4d0cf | ||
|
|
a845c5ac8f | ||
|
|
181b7f39e5 | ||
|
|
25aa5d3afe | ||
|
|
737276e855 | ||
|
|
ed26228cdc | ||
|
|
2f55cd27c5 | ||
|
|
83090bfa8c | ||
|
|
a48cd2f1b4 | ||
|
|
f487a0c0e9 | ||
|
|
5470f9fdc1 | ||
|
|
403ab167b5 | ||
|
|
043aaeab8a | ||
|
|
cf11def6b9 | ||
|
|
ff4bcb26f4 | ||
|
|
1e9cf015e9 | ||
|
|
326cd5afa0 | ||
|
|
ff8cd8b3e2 | ||
|
|
01a6dd7aab | ||
|
|
c2b58ffcce | ||
|
|
f42bc288a6 | ||
|
|
d6cbca94bd | ||
|
|
d169d2af4c | ||
|
|
ac74d6a46b | ||
|
|
41592a199a | ||
|
|
7764afaf31 | ||
|
|
73bbf4d454 | ||
|
|
ced4ac2502 | ||
|
|
6e7ca6a9b5 | ||
|
|
3b13db1e33 | ||
|
|
cd8da81c97 | ||
|
|
b222b1ecbf | ||
|
|
b990e0e71c | ||
|
|
154936c1c5 | ||
|
|
5ef51d521b | ||
|
|
db6452ee3c | ||
|
|
89dffa6dfc | ||
|
|
ffb390fe7d | ||
|
|
83eb4afdf0 | ||
|
|
bc0ab1077c | ||
|
|
018dc7c579 | ||
|
|
ef5fbb7e49 | ||
|
|
ca50123d1a | ||
|
|
6b7a468688 | ||
|
|
9f14c38396 | ||
|
|
724914b85c |
@@ -2,12 +2,9 @@ root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
|
||||
[md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
node_modules/
|
||||
doc/build/
|
||||
dist/
|
||||
tests/*.bundle.*
|
||||
input/
|
||||
|
||||
.dist
|
||||
.tmp
|
||||
.package
|
||||
|
||||
assets/
|
||||
css/
|
||||
.cypress/
|
||||
cypress/
|
||||
doc/
|
||||
markdown/
|
||||
netscript_tests/
|
||||
scripts/
|
||||
|
||||
electron/lib
|
||||
electron/greenworks.js
|
||||
src/ThirdParty/*
|
||||
src/JSInterpreter.js
|
||||
main.bundle.js
|
||||
|
||||
test/*.bundle.*
|
||||
editor.main.js
|
||||
main.bundle.js
|
||||
webpack.config.js
|
||||
webpack.config-test.js
|
||||
|
||||
55
.github/workflows/ci.yml
vendored
Normal file
55
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the dev branch
|
||||
push:
|
||||
branches: [ dev ]
|
||||
pull_request:
|
||||
branches: [ dev ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.13.1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.13.1
|
||||
cache: 'npm'
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
- name: Build the production app
|
||||
run: npm run build
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.13.1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.13.1
|
||||
cache: 'npm'
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
- name: Run linter
|
||||
run: npm run lint:report
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.13.1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.13.1
|
||||
cache: 'npm'
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
- name: Run linter
|
||||
run: npm run test
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ Changelog.txt
|
||||
Netburner.txt
|
||||
/doc/build
|
||||
/node_modules
|
||||
/electron/node_modules
|
||||
/dist/*.map
|
||||
/test/*.map
|
||||
/test/*.bundle.*
|
||||
|
||||
@@ -6,7 +6,7 @@ The game is made better because the community as a whole speaks up about
|
||||
ways to improve the game. Here's some of the ways you can make your voice
|
||||
heard:
|
||||
|
||||
- [Discord](https://discordapp.com)
|
||||
- [Discord](https://discord.gg/XKEGvHqVr3)
|
||||
There is a dedicated Discord instance set up for more free-form chats
|
||||
between all members of the community. Regular players, heavy scripters,
|
||||
Bitburner contributors, and everyone in between can be found on the
|
||||
@@ -84,7 +84,9 @@ changes are okay to contribute:
|
||||
- Changes that directly affect the game's balance
|
||||
- New gameplay mechanics
|
||||
|
||||
### How to setup fork properly
|
||||
---
|
||||
|
||||
## How to setup fork properly
|
||||
|
||||
Fork and clone the repo
|
||||
|
||||
@@ -106,7 +108,15 @@ Fork and clone the repo
|
||||
# Makes sure you always start from `danielyxie/dev` to avoid merge conflicts.
|
||||
```
|
||||
|
||||
### Running locally.
|
||||
## Development Workflow Best Practices
|
||||
|
||||
- Work in a new branch forked from the `dev` branch to isolate your new code
|
||||
- Keep code-changes on a branch as small as possible. This makes it easier for code review. Each branch should be its own independent feature.
|
||||
- Regularly rebase your branch against `dev` to make sure you have the latest updates pulled.
|
||||
- When merging, always merge your branch into `dev`. When releasing a new update, then merge `dev` into `master`
|
||||
|
||||
|
||||
## Running locally.
|
||||
|
||||
Install
|
||||
|
||||
@@ -118,10 +128,32 @@ Inside the root of the repo run
|
||||
`npm install` to install all the dependencies
|
||||
`npm run start:dev` to launch the game in dev mode.
|
||||
|
||||
After that you can open any browser and naviguate to `localhost:8000` and play the game.
|
||||
After that you can open any browser and navigate to `localhost:8000` and play the game.
|
||||
Saving a file will reload the game automatically.
|
||||
|
||||
#### Submitting a Pull Request
|
||||
|
||||
### How to build the electron app
|
||||
|
||||
Tested on Node v16.13.1 (LTS) on Windows
|
||||
These steps only work in a bash-like environment, like MinGW for Windows.
|
||||
|
||||
```sh
|
||||
# Install the main game dependencies & build the app in debug mode
|
||||
npm install
|
||||
npm run build:dev
|
||||
|
||||
# Use electron-packager to build the app to the .build/ folder
|
||||
npm run electron
|
||||
|
||||
# When launching the .exe directly, you'll need the steam_appid.txt file in the root
|
||||
# If not using windows, change this line accordingly
|
||||
cp .build/bitburner-win32-x64/resources/app/steam_appid.txt .build/bitburner-win32-x64/steam_appid.txt
|
||||
|
||||
# And run the game...
|
||||
.build/bitburner-win32-x64/bitburner.exe
|
||||
```
|
||||
|
||||
### Submitting a Pull Request
|
||||
|
||||
When submitting a pull request with your code contributions, please abide by
|
||||
the following rules:
|
||||
@@ -146,9 +178,14 @@ the following rules:
|
||||
|
||||
## As a Documentor
|
||||
|
||||
To contribute to and view your changes to the BitBurner documentation, you will
|
||||
To contribute to and view your changes to the BitBurner documentation on [Read The
|
||||
Docs](http://bitburner.readthedocs.io/), you will
|
||||
need to have Python installed, along with [Sphinx](http://www.sphinx-doc.org).
|
||||
|
||||
To make change to the [in-game documentation](./markdown/bitburner.md), you will need to modify the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts), not the markdown files.
|
||||
|
||||
We are using [API Extractor](https://api-extractor.com/pages/tsdoc/doc_comment_syntax/) (tsdoc hints) to generate the markdown doc. Make your changes to the TypeScript definitions and then run `npm run doc`.
|
||||
|
||||
Before submitting your code for a pull request, please try to follow these
|
||||
rules:
|
||||
|
||||
@@ -160,3 +197,14 @@ rules:
|
||||
_danielyxie/bitburner_ and the base is _dev_.
|
||||
- Do not check in any generated files under `doc\`. The documentation is built
|
||||
automatically by ReadTheDocs.
|
||||
|
||||
## Deploying a new version
|
||||
|
||||
Update the following
|
||||
|
||||
- `src/Constants.ts` `Version` and `LatestUpdate`
|
||||
- `package.json` `version`
|
||||
- `doc/source/conf.py` `version` and `release`
|
||||
- `doc/source/changelog.rst`
|
||||
- post to discord
|
||||
- post to reddit.com/r/Bitburner
|
||||
|
||||
87
FAQ.md
Normal file
87
FAQ.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Can I donate to the project?
|
||||
|
||||
No, the project does not take donation.
|
||||
|
||||
If you still want to donate, go donate blood to your local blood bank or donate to the [Electronic Frontier Foundation](https://www.eff.org/) or [Médecins Sans Frontières](https://www.msf.org/)
|
||||
|
||||
---
|
||||
|
||||
## I need help / Where can I learn?
|
||||
|
||||
The best way to get help is to join the [official discord server](https://discord.gg/TFc3hKD). People of all skill levels will be able to give you hints and tips.
|
||||
|
||||
---
|
||||
|
||||
## Can I play the same save on browser & steam?
|
||||
|
||||
Yes, just export the save file from the options menu & import it in the other platform.
|
||||
|
||||
---
|
||||
|
||||
## Game is stuck after running scripts!
|
||||
|
||||
You may have created an infinite loop with no sleep. You'll have to restart the game by killing all scripts.
|
||||
* On Browser: Stick `?noScript` at the end of the URL
|
||||
* On Steam:
|
||||
* In the menu, "Reloads" -> "Reload & Kill All Scripts".
|
||||
* If this does not work, when launching the game, use the kill all script options.
|
||||
|
||||
---
|
||||
|
||||
## Steam: Where is the save game located?
|
||||
|
||||
To maintain compatibility with the web browser version, the save game is not stored as a file on your filesystem. It lives inside the localStorage of the WebKit instance. You may export the save (and should backup it!) in the option menu.
|
||||
|
||||
---
|
||||
|
||||
## Steam: Game won't stop / Game is shown as "Running"
|
||||
|
||||
Due to a limitation with the way Steam tracks the game, if you launch an external link (such as documentation), Steam may keep tracking the game as "Running" even after it is closed. You should simply have to close your web browser to fix this.
|
||||
|
||||
---
|
||||
|
||||
## Steam: How do I get to the game files? <a name="game-files"></a>
|
||||
|
||||
You can navigate to the game files by right-clicking the game in your library and then go into "Manage" -> "Browse Local Files". The game can be launched directly from that location, if you're having issues with Steam.
|
||||
|
||||
---
|
||||
|
||||
## Steam: Game won't launch
|
||||
|
||||
### **On Windows**
|
||||
If the game is installed on a network drive, it will fail to start due to a [limitation in Chromium](https://github.com/electron/electron/issues/27356).
|
||||
|
||||
If you cannot move the game to another drive, you'll have to add the `--no-sandbox` launch option. In your Steam Library, Right click the game and hit "Properties". You'll see the launch option section in the "General" window.
|
||||
|
||||
### **On Linux**
|
||||
The game is built natively, do not use Proton unless native does not work.
|
||||
|
||||
When launching the game, you will be prompted with three options. If the standard launch does not work, you may attempt the `--disable-seccomp-filter-sandbox` or `--no-sandbox` launch option. If this still does not work, the game should be able to start by launching it directly or through the terminal. See [How do I get to the game files?](#game-files).
|
||||
|
||||
---
|
||||
|
||||
## Steam: File locations
|
||||
|
||||
### Logs (using [electron-log](https://github.com/megahertz/electron-log#readme))
|
||||
|
||||
You may want access the logs to get information about crashes or such.
|
||||
|
||||
* on Linux: `~/.config/bitburner/logs/main.log`
|
||||
* on macOS: `~/Library/Logs/bitburner/main.log`
|
||||
* on Windows: `%USERPROFILE%\AppData\Roaming\bitburner\logs\main.log`
|
||||
|
||||
### Config (using [electron-store](https://github.com/sindresorhus/electron-store#readme))
|
||||
|
||||
Configuration file will be written to disk in the application data directory.
|
||||
|
||||
* on Linux: `~/.config/bitburner/config.json`
|
||||
* on macOS: `~/Library/Application\ Support/bitburner/config.json`
|
||||
* on Windows: `%USERPROFILE%\AppData\Roaming\bitburner\config.json`
|
||||
|
||||
---
|
||||
|
||||
## Steam: What is the API Server?
|
||||
|
||||
The API Server allows the official [Visual Studio Code Extension](https://github.com/bitburner-official/bitburner-vscode) to push script file from VSCode to your in-game home.
|
||||
11
README.md
11
README.md
@@ -1,16 +1,19 @@
|
||||
# Bitburner
|
||||
|
||||
[](https://github.com/danielyxie/bitburner/actions/workflows/ci.yml)
|
||||
|
||||
Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game)
|
||||
that revolves around hacking and cyberpunk themes.
|
||||
The game can be played at https://danielyxie.github.io/bitburner.
|
||||
The game can be played at https://danielyxie.github.io/bitburner or installed through [Steam](https://store.steampowered.com/app/1812820/Bitburner/).
|
||||
|
||||
See the [frequently asked questions](./FAQ.md) for more information . To discuss the game or get help, join the [official discord server](https://discord.gg/TFc3hKD)
|
||||
|
||||
# Documentation
|
||||
|
||||
The game's official documentation can be found on [Read The
|
||||
Docs](http://bitburner.readthedocs.io/). Please note that this is still a
|
||||
work-in-progress.
|
||||
Docs](http://bitburner.readthedocs.io/). Please note that this is still a work-in-progress.
|
||||
|
||||
The documentation is created using [Sphinx](http://www.sphinx-doc.org).
|
||||
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).
|
||||
|
||||
Anyone is welcome to contribute to the documentation by editing the [source
|
||||
files](/doc/source) and then making a pull request with your contributions.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
## Deploying a new version
|
||||
|
||||
Update the following
|
||||
|
||||
- `src/Constants.ts` `Version` and `LatestUpdate`
|
||||
- `package.json` `version`
|
||||
- `doc/source/conf.py` `version` and `release`
|
||||
- `doc/source/changelog.rst`
|
||||
- post to discord
|
||||
- post to reddit.com/r/Bitburner
|
||||
|
||||
## Deploying `dev` to the Beta Branch
|
||||
|
||||
TODO
|
||||
|
||||
## Development Workflow Best Practices
|
||||
|
||||
- Work in a new branch forked from the `dev` branch to isolate your new code
|
||||
- Keep code-changes on a branch as small as possible. This makes it easier for code review. Each branch should be its own independent feature.
|
||||
- Regularly rebase your branch against `dev` to make sure you have the latest updates pulled.
|
||||
- When merging, always merge your branch into `dev`. When releasing a new update, then merge `dev` into `master`
|
||||
70
assets/Steam/achievements/real/BN13+.svg
Normal file
70
assets/Steam/achievements/real/BN13+.svg
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733332 67.733335"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (c3084ef, 2021-09-22)"
|
||||
sodipodi:docname="BN13+.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:zoom="2.326908"
|
||||
inkscape:cx="86.81048"
|
||||
inkscape:cy="111.09163"
|
||||
inkscape:window-width="2423"
|
||||
inkscape:window-height="1341"
|
||||
inkscape:window-x="146"
|
||||
inkscape:window-y="29"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid824" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="background">
|
||||
<rect
|
||||
style="fill:#000000;stroke:none;stroke-width:7.02745"
|
||||
id="rect849"
|
||||
width="67.73333"
|
||||
height="67.73333"
|
||||
x="0"
|
||||
y="0" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:label="main"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:bold;font-size:16.0737px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;fill:#00ff00;fill-opacity:1;stroke-width:0.215272"
|
||||
x="34.276661"
|
||||
y="40.084541"
|
||||
id="text8876"><tspan
|
||||
sodipodi:role="line"
|
||||
style="text-align:center;text-anchor:middle;fill:#00ff00;fill-opacity:1;stroke-width:0.215272"
|
||||
x="34.276661"
|
||||
y="40.084541"
|
||||
id="tspan20241">BN13+</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/Steam/achievements/tmp/real/BN13+.svg-.png
Normal file
BIN
assets/Steam/achievements/tmp/real/BN13+.svg-.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/Steam/achievements/tmp/real/BN13+.svg.png
Normal file
BIN
assets/Steam/achievements/tmp/real/BN13+.svg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
808
dist/bitburner.d.ts
vendored
808
dist/bitburner.d.ts
vendored
File diff suppressed because it is too large
Load Diff
BIN
dist/ext/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf
vendored
Normal file
BIN
dist/ext/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf
vendored
Normal file
Binary file not shown.
11619
dist/ext/monaco-editor/min/vs/base/worker/workerMain.js
vendored
Normal file
11619
dist/ext/monaco-editor/min/vs/base/worker/workerMain.js
vendored
Normal file
File diff suppressed because one or more lines are too long
415
dist/ext/monaco-editor/min/vs/basic-languages/javascript/javascript.js
vendored
Normal file
415
dist/ext/monaco-editor/min/vs/basic-languages/javascript/javascript.js
vendored
Normal file
@@ -0,0 +1,415 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
define('vs/basic-languages/typescript/typescript',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.language = exports.conf = void 0;
|
||||
exports.conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
// e.g. /** | */
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
afterText: /^\s*\*\/$/,
|
||||
action: {
|
||||
indentAction: monaco_editor_core_1.languages.IndentAction.IndentOutdent,
|
||||
appendText: ' * '
|
||||
}
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
action: {
|
||||
indentAction: monaco_editor_core_1.languages.IndentAction.None,
|
||||
appendText: ' * '
|
||||
}
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
||||
action: {
|
||||
indentAction: monaco_editor_core_1.languages.IndentAction.None,
|
||||
appendText: '* '
|
||||
}
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
||||
action: {
|
||||
indentAction: monaco_editor_core_1.languages.IndentAction.None,
|
||||
removeText: 1
|
||||
}
|
||||
}
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: "'", close: "'", notIn: ['string', 'comment'] },
|
||||
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
||||
{ open: '/**', close: ' */', notIn: ['string'] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp('^\\s*//\\s*#?region\\b'),
|
||||
end: new RegExp('^\\s*//\\s*#?endregion\\b')
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.ts',
|
||||
keywords: [
|
||||
// Should match the keys of textToKeywordObj in
|
||||
// https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts
|
||||
'abstract',
|
||||
'any',
|
||||
'as',
|
||||
'asserts',
|
||||
'bigint',
|
||||
'boolean',
|
||||
'break',
|
||||
'case',
|
||||
'catch',
|
||||
'class',
|
||||
'continue',
|
||||
'const',
|
||||
'constructor',
|
||||
'debugger',
|
||||
'declare',
|
||||
'default',
|
||||
'delete',
|
||||
'do',
|
||||
'else',
|
||||
'enum',
|
||||
'export',
|
||||
'extends',
|
||||
'false',
|
||||
'finally',
|
||||
'for',
|
||||
'from',
|
||||
'function',
|
||||
'get',
|
||||
'if',
|
||||
'implements',
|
||||
'import',
|
||||
'in',
|
||||
'infer',
|
||||
'instanceof',
|
||||
'interface',
|
||||
'is',
|
||||
'keyof',
|
||||
'let',
|
||||
'module',
|
||||
'namespace',
|
||||
'never',
|
||||
'new',
|
||||
'null',
|
||||
'number',
|
||||
'object',
|
||||
'package',
|
||||
'private',
|
||||
'protected',
|
||||
'public',
|
||||
'override',
|
||||
'readonly',
|
||||
'require',
|
||||
'global',
|
||||
'return',
|
||||
'set',
|
||||
'static',
|
||||
'string',
|
||||
'super',
|
||||
'switch',
|
||||
'symbol',
|
||||
'this',
|
||||
'throw',
|
||||
'true',
|
||||
'try',
|
||||
'type',
|
||||
'typeof',
|
||||
'undefined',
|
||||
'unique',
|
||||
'unknown',
|
||||
'var',
|
||||
'void',
|
||||
'while',
|
||||
'with',
|
||||
'yield',
|
||||
'async',
|
||||
'await',
|
||||
'of'
|
||||
],
|
||||
operators: [
|
||||
'<=',
|
||||
'>=',
|
||||
'==',
|
||||
'!=',
|
||||
'===',
|
||||
'!==',
|
||||
'=>',
|
||||
'+',
|
||||
'-',
|
||||
'**',
|
||||
'*',
|
||||
'/',
|
||||
'%',
|
||||
'++',
|
||||
'--',
|
||||
'<<',
|
||||
'</',
|
||||
'>>',
|
||||
'>>>',
|
||||
'&',
|
||||
'|',
|
||||
'^',
|
||||
'!',
|
||||
'~',
|
||||
'&&',
|
||||
'||',
|
||||
'??',
|
||||
'?',
|
||||
':',
|
||||
'=',
|
||||
'+=',
|
||||
'-=',
|
||||
'*=',
|
||||
'**=',
|
||||
'/=',
|
||||
'%=',
|
||||
'<<=',
|
||||
'>>=',
|
||||
'>>>=',
|
||||
'&=',
|
||||
'|=',
|
||||
'^=',
|
||||
'@'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [[/[{}]/, 'delimiter.bracket'], { include: 'common' }],
|
||||
common: [
|
||||
// identifiers and keywords
|
||||
[
|
||||
/[a-z_$][\w$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}
|
||||
],
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// [/[A-Z][\w\$]*/, 'identifier'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
||||
[
|
||||
/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
|
||||
{ token: 'regexp', bracket: '@open', next: '@regexp' }
|
||||
],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/!(?=([^=]|$))/, 'delimiter'],
|
||||
[
|
||||
/@symbols/,
|
||||
{
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}
|
||||
],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)n?/, 'number.hex'],
|
||||
[/0[oO]?(@octaldigits)n?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)n?/, 'number.binary'],
|
||||
[/(@digits)n?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string_double'],
|
||||
[/'/, 'string', '@string_single'],
|
||||
[/`/, 'string', '@string_backtick']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment']
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
jsdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
[
|
||||
/(\{)(\d+(?:,\d*)?)(\})/,
|
||||
['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']
|
||||
],
|
||||
[
|
||||
/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
|
||||
['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]
|
||||
],
|
||||
[/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
|
||||
[/[()]/, 'regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[
|
||||
/(\/)([dgimsuy]*)/,
|
||||
[{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']
|
||||
]
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[
|
||||
/\]/,
|
||||
{
|
||||
token: 'regexp.escape.control',
|
||||
next: '@pop',
|
||||
bracket: '@close'
|
||||
}
|
||||
]
|
||||
],
|
||||
string_double: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
string_single: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, 'string', '@pop']
|
||||
],
|
||||
string_backtick: [
|
||||
[/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
|
||||
[/[^\\`$]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/`/, 'string', '@pop']
|
||||
],
|
||||
bracketCounting: [
|
||||
[/\{/, 'delimiter.bracket', '@bracketCounting'],
|
||||
[/\}/, 'delimiter.bracket', '@pop'],
|
||||
{ include: 'common' }
|
||||
]
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
define('vs/basic-languages/javascript/javascript',["require", "exports", "../typescript/typescript"], function (require, exports, typescript_1) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.language = exports.conf = void 0;
|
||||
exports.conf = typescript_1.conf;
|
||||
exports.language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.js',
|
||||
keywords: [
|
||||
'break',
|
||||
'case',
|
||||
'catch',
|
||||
'class',
|
||||
'continue',
|
||||
'const',
|
||||
'constructor',
|
||||
'debugger',
|
||||
'default',
|
||||
'delete',
|
||||
'do',
|
||||
'else',
|
||||
'export',
|
||||
'extends',
|
||||
'false',
|
||||
'finally',
|
||||
'for',
|
||||
'from',
|
||||
'function',
|
||||
'get',
|
||||
'if',
|
||||
'import',
|
||||
'in',
|
||||
'instanceof',
|
||||
'let',
|
||||
'new',
|
||||
'null',
|
||||
'return',
|
||||
'set',
|
||||
'super',
|
||||
'switch',
|
||||
'symbol',
|
||||
'this',
|
||||
'throw',
|
||||
'true',
|
||||
'try',
|
||||
'typeof',
|
||||
'undefined',
|
||||
'var',
|
||||
'void',
|
||||
'while',
|
||||
'with',
|
||||
'yield',
|
||||
'async',
|
||||
'await',
|
||||
'of'
|
||||
],
|
||||
typeKeywords: [],
|
||||
operators: typescript_1.language.operators,
|
||||
symbols: typescript_1.language.symbols,
|
||||
escapes: typescript_1.language.escapes,
|
||||
digits: typescript_1.language.digits,
|
||||
octaldigits: typescript_1.language.octaldigits,
|
||||
binarydigits: typescript_1.language.binarydigits,
|
||||
hexdigits: typescript_1.language.hexdigits,
|
||||
regexpctl: typescript_1.language.regexpctl,
|
||||
regexpesc: typescript_1.language.regexpesc,
|
||||
tokenizer: typescript_1.language.tokenizer
|
||||
};
|
||||
});
|
||||
|
||||
4170
dist/ext/monaco-editor/min/vs/editor/editor.main.css
vendored
Normal file
4170
dist/ext/monaco-editor/min/vs/editor/editor.main.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
136614
dist/ext/monaco-editor/min/vs/editor/editor.main.js
vendored
Normal file
136614
dist/ext/monaco-editor/min/vs/editor/editor.main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1404
dist/ext/monaco-editor/min/vs/editor/editor.main.nls.js
vendored
Normal file
1404
dist/ext/monaco-editor/min/vs/editor/editor.main.nls.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1532
dist/ext/monaco-editor/min/vs/language/typescript/tsMode.js
vendored
Normal file
1532
dist/ext/monaco-editor/min/vs/language/typescript/tsMode.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
157322
dist/ext/monaco-editor/min/vs/language/typescript/tsWorker.js
vendored
Normal file
157322
dist/ext/monaco-editor/min/vs/language/typescript/tsWorker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1911
dist/ext/monaco-editor/min/vs/loader.js
vendored
Normal file
1911
dist/ext/monaco-editor/min/vs/loader.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
dist/ext/monaco-vim.js
vendored
Normal file
7
dist/ext/monaco-vim.js
vendored
Normal file
File diff suppressed because one or more lines are too long
160
dist/vendor.bundle.js
vendored
160
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,3 +12,4 @@ must be unlocked.
|
||||
Source-Files <advancedgameplay/sourcefiles>
|
||||
Intelligence <advancedgameplay/intelligence>
|
||||
Sleeves <advancedgameplay/sleeves>
|
||||
Hacking algorithms <advancedgameplay/hackingalgorithms>
|
||||
|
||||
BIN
doc/source/advancedgameplay/batch.png
Normal file
BIN
doc/source/advancedgameplay/batch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
126
doc/source/advancedgameplay/hackingalgorithms.rst
Normal file
126
doc/source/advancedgameplay/hackingalgorithms.rst
Normal file
@@ -0,0 +1,126 @@
|
||||
Hacking algorithms
|
||||
==================
|
||||
|
||||
There are three primary families of hacking algorithms. This guide will go over each of them and advise on how they can be implemented.
|
||||
|
||||
Self-contained algorithms
|
||||
-------------------------
|
||||
**Difficulty**: Easy
|
||||
|
||||
Pros:
|
||||
|
||||
* Easy to implement
|
||||
* Does not require other scripts to work
|
||||
* Works at any stage of the game
|
||||
|
||||
Cons:
|
||||
|
||||
* Limits income generation
|
||||
* Extremely RAM inefficient
|
||||
* Utilizes script online time poorly
|
||||
* Risk of over hacking
|
||||
|
||||
Self-contained algorithms are the simplest family of hacking algorithms to implement. Each script is tasked with choosing which function to execute based on the status of the target server. Because of this, they guarantee a consistent, but relatively small, flow of money.
|
||||
|
||||
The general logic goes like this:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
loop forever {
|
||||
if security is not minimum {
|
||||
weaken(target)
|
||||
} else if money is not maximum {
|
||||
grow(target)
|
||||
} else {
|
||||
hack(target)
|
||||
}
|
||||
}
|
||||
|
||||
This algorithm is perfectly capable of paving the way through the majority of the game, but it has a few significant issues.
|
||||
|
||||
- It tends to make all your scripts on every server do the same thing. (e.g. If the target is 0.01 security above the minimum, all scripts will decide to weaken, when only a handful of threads should be devoted to the task)
|
||||
- At higher thread counts, these scripts have the potential to hack the server to $0, or maximum security, requiring a long setup time while the scripts return the server to the best stats.
|
||||
- Requires function calls such as `getServerSecurityLevel()` and `getServerMoneyAvailable()`, as well as calling all three hacking functions, increasing RAM cost which is multiplied by the number of allocated threads
|
||||
|
||||
Loop algorithms
|
||||
---------------
|
||||
**Difficulty**: Easy to Medium
|
||||
|
||||
Pros:
|
||||
|
||||
* Simple to understand
|
||||
* Works at any stage of the game
|
||||
* Maximize RAM usage
|
||||
|
||||
Cons:
|
||||
|
||||
* Requires a script that handles deployment
|
||||
|
||||
By splitting our hack, weaken, and grow functions into three separate scripts, we can both remove our reliance on functions such as `getServerSecurityLevel()` as well as removing functions that cannot work concurrently, reducing RAM requirements, and thus increasing our thread limits. Loop scripts are formatted like this:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
loop forever {
|
||||
hack(target) // or grow, or weaken
|
||||
}
|
||||
|
||||
Now we can take the total amount of threads available and split it and allocate, for example:
|
||||
|
||||
- 1 part to the hack scripts
|
||||
- 10 parts to the grow scripts
|
||||
- 2 parts to the weaken scripts
|
||||
|
||||
Meaning if we have space for 100 threads across the entire network 7 threads will go to the hack scripts, 76 threads will go to the grow scripts and 15 threads will go to the weaken scripts. The ratios described here are arbitrary and can be greatly improved through the use of the analyze functions, and later, through the use of Formulas.exe.
|
||||
|
||||
When utilizing this strategy, monitor the amount of money and security on the target server, if the money is not hovering around maximum and the security around the minimum, the ratios should be tweaked until that is the case.
|
||||
|
||||
Growth can be made more efficient by dividing it into many processes, instead of one script with a high thread count. Four grow scripts with 20 threads will outperform one grow script with 80 threads.
|
||||
|
||||
Utilizing `sleep()` or `asleep()` to ensure that your scripts do not all start at the same time can decrease the chance of issues associated with overhacking occurring. Both functions have a ram cost of zero.
|
||||
|
||||
Batch algorithms (HGW, HWGW, or Cycles)
|
||||
---------------------------------------
|
||||
**Difficulty**: Hard
|
||||
|
||||
Pros:
|
||||
|
||||
* Maximum potential income
|
||||
|
||||
Cons:
|
||||
|
||||
* Very difficult to implement without prior programming knowledge
|
||||
* Very difficult to make work on servers with less than 1TB of RAM
|
||||
|
||||
Batch algorithms utilize a master script that uses `exec()` many scripts which utilize a relevant hacking function in batches.
|
||||
|
||||
The scripts used to execute the hacking functions are even simpler than the previous algorithms but a complex controller is required to calculate the effect, time taken, and the necessary delay.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
sleep(a bit)
|
||||
hack(target) // or grow, or weaken
|
||||
|
||||
A few things need to be known before this algorithm can be implemented:
|
||||
|
||||
- The effects of hack and grow depend on the server security level, a higher security level results in a reduced effect. You only want these effects to occur when the security level is minimized.
|
||||
- The time taken to execute hack, grow, or weaken is determined when the function is called and is based on the security level of the target server and your hacking level. You only want these effects to start when the security level is minimized.
|
||||
- The effects of hack, grow, and weaken, are determined when the time is completed, rather than at the beginning. Hack should finish when security is minimum and money is maximum. Grow should finish when security is minimum, shortly after a hack occurred. Weaken should occur when security is not at a minimum due to a hack or grow increasing it.
|
||||
|
||||
A single batch consists of four actions:
|
||||
|
||||
1. A hack script removes a predefined, precalculated amount of money from the target server.
|
||||
2. A weaken script counters the security increase of the hack script.
|
||||
3. A grow script counters the money decrease caused by the hack script.
|
||||
4. A weaken script counters the security increase caused by the grow script.
|
||||
|
||||
It is also important that these 4 scripts finish in the order specified above, and all of their effects be precalculated to optimize the ratios between them. This is the reason for the delay in the scripts.
|
||||
|
||||
It is possible to create batches with 3 scripts (HGW) but the efficiency of grow will be harmed by the security increase caused by the hack scripts.
|
||||
|
||||
The following is an image demonstrating batches in action:
|
||||
|
||||
.. image:: batch.png
|
||||
|
||||
Batches only function predictably when the target server is at minimum security and maximum money, so your script must also handle preparing a server for your batches. You can utilize batches to prepare a server by using no hack threads during preparation.
|
||||
|
||||
Depending on your computer's performance as well as a few other factors, the necessary delay between script execution times may range between 20ms and 200ms, you want to fine-tune this value to be as low as possible while also avoiding your scripts finishing out of order. Anything lower than 20ms will not work due to javascript limitations.
|
||||
@@ -18,7 +18,7 @@ Sleeve technology is unlocked in :ref:`BitNode-10 <gameplay_bitnodes>`.
|
||||
|
||||
Duplicate Sleeves
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciuosness
|
||||
Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness
|
||||
has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.
|
||||
|
||||
Duplicate Sleeves are essentially clones which you can use to perform work-type actions,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Source-Files
|
||||
============
|
||||
Source-Files are a type of persistent upgrade that are more powerful than Augmentations.
|
||||
Source-Files are a type of persistent upgrade that is more powerful than Augmentations.
|
||||
Source-Files are received by destroying a BitNode. There are many different BitNodes
|
||||
in the game and each BitNode will grant a different Source-File when it is destroyed.
|
||||
|
||||
@@ -15,20 +15,20 @@ of level 3.
|
||||
List of all Source-Files
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-1: Source Genesis || * Lets the player start with 32 GB of RAM on home computer. |
|
||||
|| BitNode-1: Source Genesis || * Let the player start with 32 GB of RAM on the home computer. |
|
||||
|| || * Increases all of the player's multipliers by 16%/24%/28%. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-2: Rise of the Underworld || * Lets the player create Gangs in other BitNodes (although some |
|
||||
|| BitNode-2: Rise of the Underworld || * Let the player create Gangs in other BitNodes (although some |
|
||||
|| || BitNodes will disable this mechanic). |
|
||||
|| || * Increases the player's crime success rate, crime money, and |
|
||||
|| || charisma multipliers by 24%/36%/42%. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-3: Corporatocracy || * Lets the player create Corporations in other BitNodes (although some |
|
||||
|| BitNode-3: Corporatocracy || * Let the player create Corporations in other BitNodes (although some |
|
||||
|| || BitNodes will disable this mechanic). |
|
||||
|| || * Increases the player's charisma and company salary multipliers by 8%/12%/14%. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-4: The Singularity || * Lets the player access and use Netscript Singularity Functions in other BitNodes. |
|
||||
|| || * Each level of this Source-File opens up more of the Singularity Functions to use. |
|
||||
|| BitNode-4: The Singularity || * Let the player access and use Netscript Singularity Functions in other BitNodes. |
|
||||
|| || * Each level of this Source-File reduces the RAM cost of singularity functions. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-5: Artificial Intelligence || * Unlocks :ref:`gameplay_intelligence`. |
|
||||
|| || * Unlocks :js:func:`getBitNodeMultipliers` and start with Formulas.exe. |
|
||||
@@ -47,7 +47,7 @@ List of all Source-Files
|
||||
|| || * Level 3 grants permanent access to use limit/stop orders. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-9: Hacktocracy || * Level 1 permanently unlocks the Hacknet Server in other BitNodes. |
|
||||
|| || * Level 2 lets the player start with 128 GB of RAM on home computer. |
|
||||
|| || * Level 2 lets the player start with 128 GB of RAM on the home computer. |
|
||||
|| || * Level 3 grants a highly-upgraded Hacknet Server when entering a new BitNode (it |
|
||||
|| || will be lost after installing augments). |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -60,6 +60,6 @@ List of all Source-Files
|
||||
|| || 32%/48%/56%. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|| BitNode-12: The Recursion || * There is no maximum level for this Source-File. |
|
||||
|| || * Lets the player start with Neuroflux Governor equal to the level of this |
|
||||
|| || * Let the player start with Neuroflux Governor equal to the level of this |
|
||||
|| || Source-File. |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -13,7 +13,8 @@ Server RAM
|
||||
Perhaps the most important property of a server to make note of is its RAM,
|
||||
which refers to how much memory is available on that machine. RAM is
|
||||
important because it is required to run Scripts. More RAM allows
|
||||
the user to run more powerful and complicated scripts.
|
||||
the user to run more powerful and complicated scripts as well as executing
|
||||
a script with :ref:`more threads <gameplay_scripts_multithreadingscripts>`.
|
||||
|
||||
The `free`, `scan-analyze`, and `analyze` Terminal commands
|
||||
can be used to check how much RAM a server has.
|
||||
|
||||
@@ -432,7 +432,10 @@ empty file will be created.
|
||||
ps
|
||||
^^
|
||||
|
||||
$ ps [-g, --grep pattern]
|
||||
|
||||
Prints all scripts that are currently running on the current server.
|
||||
The :code:`-g, --grep pattern` option will only output running scripts where the name matches the provided pattern.
|
||||
|
||||
rm
|
||||
^^
|
||||
|
||||
@@ -3,8 +3,194 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v1.3.0 - 2022-01-04 Cleaning up
|
||||
-------------------------------
|
||||
|
||||
** External IDE integration **
|
||||
|
||||
* The Steam version has a webserver that allows integration with external IDEs.
|
||||
A VSCode extension is available on the market place. (The documentation for the ext. isn't
|
||||
written yet)
|
||||
|
||||
** Source-Files **
|
||||
|
||||
* SF4 has been reworked.
|
||||
* New SF -1.
|
||||
|
||||
** UI **
|
||||
|
||||
* Fix some edge case with skill bat tooltips (@MartinFournier)
|
||||
* Made some background match theme color (@Kejikus)
|
||||
* Fix problem with script editor height not adjusting correctly (@billyvg)
|
||||
* Fix some formatting issues with Bladeburner (@MartinFournier, @nickofolas)
|
||||
* Fix some functions like 'alert' format messages better (@MageKing17)
|
||||
* Many community themes added.
|
||||
* New script editor theme (@Hedrauta, @Dexalt142)
|
||||
* Improvements to tail windows (@theit8514)
|
||||
* Training is more consise (@mikomyazaki)
|
||||
* Fix Investopedia not displaying properly (@JotaroS)
|
||||
* Remove alpha from theme editor (@MartinFournier)
|
||||
* Fix corporation tooltip not displaying properly (@MartinFournier)
|
||||
* Add tooltip on backdoored location names (@MartinFournier)
|
||||
* Allow toasts to be dismissed by clicking them (@nickofolas)
|
||||
* Darkweb item listing now shows what you own. (@hexnaught)
|
||||
|
||||
** Bug fix **
|
||||
|
||||
* Fix unit tests (@MartinFournier)
|
||||
* Fixed issue with 'cat' and 'read' not finding foldered files (@Nick-Colclasure)
|
||||
* Buying on the dark web will remove incomplete exe (@hexnaught)
|
||||
* Fix bug that would cause the game to crash trying to go to a job without a job (@hexnaught)
|
||||
* purchaseServer validation (@nickofolas)
|
||||
* Script Editor focuses code when changing tab (@MartinFournier)
|
||||
* Fix script editor for .txt files (@65-7a)
|
||||
* Fix 'buy' command not displaying correctly. (@hexnaught)
|
||||
* Fix hackAnalyzeThread returning NaN (@mikomyazaki)
|
||||
* Electron handles exceptions better (@MageKing17)
|
||||
* Electron will handle 'unresponsive' event and present the opportunity to reload the game with no scripts (@MartinFournier)
|
||||
* Fix 'cp' between folders (@theit8514)
|
||||
* Fix throwing null/undefined errors (@nickofolas)
|
||||
* Allow shortcuts to work when unfocused (@MageKing17)
|
||||
* Fix some dependency issue (@locriacyber)
|
||||
* Fix corporation state returning an object instead of a string (@antonvmironov)
|
||||
* Fix 'mv' overwriting files (@theit8514)
|
||||
* Fix joesguns not being influenced by hack/grow (@dou867, @MartinFournier)
|
||||
* Added warning when opening external links. (@MartinFournier)
|
||||
* Prevent applying for positions that aren't offered (@TheMas3212)
|
||||
* Import has validation (@MartinFournier)
|
||||
|
||||
** Misc. **
|
||||
|
||||
* Added vim mode to script editor (@billyvg)
|
||||
* Clean up script editor code (@Rez855)
|
||||
* 'cat' works on scripts (@65-7a)
|
||||
* Add wordWrap for Monaco (@MartinFournier)
|
||||
* Include map bundles in electron for easier debugging (@MartinFournier)
|
||||
* Fix importing very large files (@MartinFournier)
|
||||
* Cache program blob, reducing ram usage of the game (@theit8514)
|
||||
* Dev menu can set server to $0 (@mikomyazaki)
|
||||
* 'backdoor' allows direct connect (@mikomyazaki)
|
||||
* Github workflow work (@MartinFournier)
|
||||
* workForFaction / workForCompany have a new parameter (@theit8514)
|
||||
* Alias accept single quotes (@sporkwitch, @FaintSpeaker)
|
||||
* Add grep options to 'ps' (@maxtimum)
|
||||
* Added buy all option to 'buy' (@anthonydroberts)
|
||||
* Added more shortcuts to terminal input (@Frank-py)
|
||||
* Refactor some port code (@ErzengelLichtes)
|
||||
* Settings to control GiB vs GB (@ErzengelLichtes)
|
||||
* Add electron option to export save game (@MartinFournier)
|
||||
* Electron improvements (@MartinFournier)
|
||||
* Expose some notifications functions to electron (@MartinFournier)
|
||||
* Documentation (@MartinFournier, @cyn, @millennIumAMbiguity, @2PacIsAlive,
|
||||
@TheCoderJT, @hexnaught, @sschmidTU, @FOLLGAD, @Hedrauta, @Xynrati,
|
||||
@mikomyazaki, @Icehawk78, @aaronransley, @TheMas3212, @Hedrauta, @alkemann,
|
||||
@ReeseJones, @amclark42, @thadguidry, @jasonhaxstuff, @pan-kuleczka, @jhollowe,
|
||||
@ApatheticsAnonymous, @erplsf, @daanflore, @nickofolas, @Kebap, @smolgumball,
|
||||
@woody-lam-cwl)
|
||||
|
||||
|
||||
|
||||
v1.1.0 - 2021-12-18 You guys are awesome (community because they're god damn awesome)
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
** Script Editor **
|
||||
|
||||
* The text editor can open several files at once. (@Rez855 / @Shadow72)
|
||||
It's not perfect so keep the feedback coming.
|
||||
|
||||
** Steam **
|
||||
|
||||
* Windows has a new launch option that lets player start with killing all their scripts
|
||||
This is a safety net in case all the other safety nets fail.
|
||||
* Linux has several launch options that use different flags for different OS.
|
||||
* Debug and Fullscreen are available in the window utility bar.
|
||||
* Tried (and maybe failed) to make the game completely kill itself after closing.
|
||||
This one I still don't know wtf is going.
|
||||
* No longer has background throttling.
|
||||
* Default color should be pitch black when loading
|
||||
* Add BN13: Challenge achievement.
|
||||
|
||||
** Tutorial **
|
||||
|
||||
* I watched someone play bitburner on youtube and reworked part of
|
||||
the tutorial to try to make some parts of the game clearer.
|
||||
https://www.youtube.com/watch?v=-_JETXff4Zo
|
||||
* Add option to restart tutorial.
|
||||
|
||||
** Netscript **
|
||||
|
||||
* getGangInformation returns more information.
|
||||
* getAscensionResult added
|
||||
* getMemberInformation returns more info
|
||||
* Formulas API has new functions for gang.
|
||||
* Added documentation for corp API.
|
||||
* exec has clearer error message when you send invalid data.
|
||||
* getServer returns all defined field for hacknet servers.
|
||||
* Fix a bug with scp multiple files (@theit8514)
|
||||
* Stack traces should be smarter at replacing blobs with filenames
|
||||
* Fix a weird error message that would occur when throwing raw strings.
|
||||
* Fix shortcuts not working.
|
||||
* Re-added setFocus and isFocused (@theit8514)
|
||||
* new function getHashUpgrades (@MartinFournier)
|
||||
* enableLog accepts "ALL" like disableLog (@wynro)
|
||||
* toast() doesn't crash on invalid data (@ivanjermakov)
|
||||
* alert() doesn't crash on invalid data (@Siern)
|
||||
* Fixed an issue where scripts don't run where they should.
|
||||
* Sleeve getInformation now returns cha
|
||||
* getServer does work with no argument now
|
||||
* workForFaction returns false when it mistakenly returned null
|
||||
|
||||
** Character Overview **
|
||||
|
||||
* The character overview now shows the amount of exp needed to next level (@MartinFournier)
|
||||
|
||||
** Misc. **
|
||||
|
||||
* Add option to supress Game Saved! toasts (@MartinFournier)
|
||||
* Fix bug where ctrl+alt+j was eaten by the wrong process. (@billyvg)
|
||||
* Theme Editor lets you paste colors (@MartinFournier)
|
||||
* ctrl + u/k/w should work on terminal (@billyvg)
|
||||
* Game now shows commit number, this is mostly for me. (@MartinFourier)
|
||||
* running a bad script will give a clearer error message (@TheCoderJT)
|
||||
* Default terminal capacity is maximum (@SayntGarmo)
|
||||
* Fix problems with cp and mv (@theit8514)
|
||||
* Make monaco load fully offline for players behind firewalls.
|
||||
* change beginer guide to use n00dles instead of foodnstuff
|
||||
* BN13 is harder
|
||||
* nerf int gain from manualHack
|
||||
* Fix UI displaying wrong stats (@DJMatch3000)
|
||||
* Fix button not disabling as it should.
|
||||
* New location in Ishima.
|
||||
* Add setting to suppress stock market popups.
|
||||
* Typo fixes (@Hedrauta, @cvr-119, @Ationi, @millennIumAMbiguity
|
||||
@TealKoi, @TheCoderJT, @cblte, @2PacIsAlive, @MageKing17,
|
||||
@Xynrati, @Adraxas, @pobiega)
|
||||
* Fix 100% territory achievement.
|
||||
* Reword message on active scripts page.
|
||||
* Fix terminal not clearing after BN
|
||||
* Remove references to .fconf
|
||||
* Augmentation pages shows BN difficulty with SF5
|
||||
* Fix scripts saving on wrong server while 'connect'ing
|
||||
* Fix gym discount not working.
|
||||
* Fix scan-analyze not working with timestamps
|
||||
* Hash upgrades remember last choice.
|
||||
* Save files now sort by date
|
||||
* The covenant no longer supports negative memory purchases
|
||||
* Fix corp shares buyback triggering by pressing enter
|
||||
* Staneks gift display avg / num charges
|
||||
* Infiltration rewards no longer decay with better stats
|
||||
* terminal 'true' is parsed as boolean not string
|
||||
* tail and kill use autocomplete()
|
||||
* Fix focus for coding contract
|
||||
* massive boost to noodle bar.
|
||||
|
||||
** Special Thanks **
|
||||
|
||||
* Special thank you to everyone on Discord who can answer
|
||||
new player questions so I can focus on more important things.
|
||||
|
||||
v1.1.0 - 2021-12-03 BN13: They're Lunatics (hydroflame & community)
|
||||
-------------------------------------------------------
|
||||
-------------------------------------------------------------------
|
||||
|
||||
** BN13: They're Lunatics **
|
||||
|
||||
@@ -16,6 +202,10 @@ v1.1.0 - 2021-12-03 BN13: They're Lunatics (hydroflame & community)
|
||||
* 94 achievements added
|
||||
* Release is 2021-12-10.
|
||||
|
||||
** Corporation API **
|
||||
|
||||
* Added corporation API. (Unstable)
|
||||
|
||||
** Netscript **
|
||||
|
||||
* tprintf crashes when not giving a format as first arg.
|
||||
|
||||
@@ -56,7 +56,7 @@ master_doc = 'index'
|
||||
# General information about the project.
|
||||
project = 'Bitburner'
|
||||
author = 'Bitburner'
|
||||
copyright = '2018, {0}'.format(author)
|
||||
copyright = '2016, {0}'.format(author)
|
||||
documentation_title = '{0} Documentation'.format(project)
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@@ -64,9 +64,9 @@ documentation_title = '{0} Documentation'.format(project)
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '1.1'
|
||||
version = '1.3'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.1.0'
|
||||
release = '1.3.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
@@ -28,16 +28,16 @@ entire "quest-line".
|
||||
First Steps
|
||||
-----------
|
||||
I'm going to assume you followed the introductory tutorial when you first began the game.
|
||||
In this introductory tutorial you created a script called :code:`foodnstuff.script` and ran it
|
||||
on the :code:`foodnstuff` server. Right now, we'll kill this script. There are two ways
|
||||
In this introductory tutorial you created a script called :code:`n00dles.script` and ran it
|
||||
on the :code:`n00dles` server. Right now, we'll kill this script. There are two ways
|
||||
to do this:
|
||||
|
||||
1. You can go to the Terminal and enter::
|
||||
|
||||
$ kill foodnstuff.script
|
||||
$ kill n00dles.script
|
||||
|
||||
2. You can go to the :code:`Active Scripts` page (|Keyboard shortcut| Alt + s) and
|
||||
press the "Kill Script" button for :code:`foodnstuff.script`.
|
||||
press the "Kill Script" button for :code:`n00dles.script`.
|
||||
|
||||
If you skipped the introductory tutorial, then ignore the part above. Instead, go to the
|
||||
:code:`Hacknet Nodes` page (|Keyboard shortcut| Alt + h) and purchase a
|
||||
@@ -82,8 +82,8 @@ Enter the following code in the script editor:
|
||||
.. code:: javascript
|
||||
|
||||
// Defines the "target server", which is the server
|
||||
// that we're going to hack. In this case, it's "foodnstuff"
|
||||
var target = "foodnstuff";
|
||||
// that we're going to hack. In this case, it's "n00dles"
|
||||
var target = "n00dles";
|
||||
|
||||
// Defines how much money a server should have before we hack it
|
||||
// In this case, it is set to 75% of the server's max money
|
||||
@@ -122,10 +122,10 @@ step-by-step anyways.
|
||||
|
||||
.. code:: javascript
|
||||
|
||||
var target = "foodnstuff";
|
||||
var target = "n00dles";
|
||||
|
||||
This first command defines a string which contains our target server. That's the server
|
||||
that we're going to hack. For now, it's set to `foodnstuff` because that's the only
|
||||
that we're going to hack. For now, it's set to `n00dles` because that's the only
|
||||
server with a required hacking level of 1. If you want to hack a different server,
|
||||
simply change this
|
||||
variable to be the hostname of another server.
|
||||
@@ -196,59 +196,64 @@ Here's what mine showed at the time I made this::
|
||||
[home ~]> scan-analyze 2
|
||||
~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~
|
||||
|
||||
>foodnstuff
|
||||
--Root Access: NO, Required hacking skill: 1
|
||||
n00dles
|
||||
--Root Access: YES, Required hacking skill: 1
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16
|
||||
|
||||
>sigma-cosmetics
|
||||
--Root Access: NO, Required hacking skill: 5
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16
|
||||
|
||||
>joesguns
|
||||
--Root Access: NO, Required hacking skill: 10
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16
|
||||
|
||||
---->max-hardware
|
||||
------Root Access: NO, Required hacking skill: 80
|
||||
------Number of open ports required to NUKE: 1
|
||||
------RAM: 32
|
||||
|
||||
>hong-fang-tea
|
||||
--Root Access: NO, Required hacking skill: 30
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16
|
||||
|
||||
---->nectar-net
|
||||
------Root Access: NO, Required hacking skill: 20
|
||||
------Number of open ports required to NUKE: 0
|
||||
------RAM: 16
|
||||
|
||||
>harakiri-sushi
|
||||
--Root Access: NO, Required hacking skill: 40
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16
|
||||
|
||||
>iron-gym
|
||||
--Root Access: NO, Required hacking skill: 100
|
||||
--Number of open ports required to NUKE: 1
|
||||
--RAM: 32
|
||||
|
||||
---->zer0
|
||||
--RAM: 4.00GB
|
||||
|
||||
----zer0
|
||||
------Root Access: NO, Required hacking skill: 75
|
||||
------Number of open ports required to NUKE: 1
|
||||
------RAM: 32
|
||||
|
||||
---->CSEC
|
||||
------RAM: 32.00GB
|
||||
|
||||
foodnstuff
|
||||
--Root Access: NO, Required hacking skill: 1
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16.00GB
|
||||
|
||||
sigma-cosmetics
|
||||
--Root Access: NO, Required hacking skill: 5
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16.00GB
|
||||
|
||||
joesguns
|
||||
--Root Access: NO, Required hacking skill: 10
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16.00GB
|
||||
|
||||
----max-hardware
|
||||
------Root Access: NO, Required hacking skill: 80
|
||||
------Number of open ports required to NUKE: 1
|
||||
------RAM: 32.00GB
|
||||
|
||||
----CSEC
|
||||
------Root Access: NO, Required hacking skill: 54
|
||||
------Number of open ports required to NUKE: 1
|
||||
------RAM: 8
|
||||
------RAM: 8.00GB
|
||||
|
||||
hong-fang-tea
|
||||
--Root Access: NO, Required hacking skill: 30
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16.00GB
|
||||
|
||||
----nectar-net
|
||||
------Root Access: NO, Required hacking skill: 20
|
||||
------Number of open ports required to NUKE: 0
|
||||
------RAM: 16.00GB
|
||||
|
||||
harakiri-sushi
|
||||
--Root Access: NO, Required hacking skill: 40
|
||||
--Number of open ports required to NUKE: 0
|
||||
--RAM: 16.00GB
|
||||
|
||||
iron-gym
|
||||
--Root Access: NO, Required hacking skill: 100
|
||||
--Number of open ports required to NUKE: 1
|
||||
--RAM: 32.00GB
|
||||
|
||||
Take note of the following servers:
|
||||
|
||||
* |foodnstuff|
|
||||
* |n00dles|
|
||||
* |sigma-cosmetics|
|
||||
* |joesguns|
|
||||
* |nectar-net|
|
||||
@@ -279,15 +284,15 @@ servers, we have to do the following:
|
||||
Here's the sequence of |Terminal| commands I used in order to achieve this::
|
||||
|
||||
$ home
|
||||
$ scp early-hack-template.script foodnstuff
|
||||
$ scp early-hack-template.script n00dles
|
||||
$ scp early-hack-template.script sigma-cosmetics
|
||||
$ scp early-hack-template.script joesguns
|
||||
$ scp early-hack-template.script nectar-net
|
||||
$ scp early-hack-template.script hong-fang-tea
|
||||
$ scp early-hack-template.script harakiri-sushi
|
||||
$ connect foodnstuff
|
||||
$ connect n00dles
|
||||
$ run NUKE.exe
|
||||
$ run early-hack-template.script -t 6
|
||||
$ run early-hack-template.script -t 1
|
||||
$ home
|
||||
$ connect sigma-cosmetics
|
||||
$ run NUKE.exe
|
||||
@@ -334,10 +339,10 @@ we start running more scripts.
|
||||
|
||||
Increasing Hacking Level
|
||||
------------------------
|
||||
There are many servers besides |foodnstuff| that can be hacked, but they have
|
||||
There are many servers besides |n00dles| that can be hacked, but they have
|
||||
higher required hacking levels. Therefore, we should raise our hacking level. Not only
|
||||
will this let us hack more servers, but it will also increase the effectiveness of our hacking
|
||||
against |foodnstuff|.
|
||||
against |n00dles|.
|
||||
|
||||
The easiest way to train your hacking level is to visit Rothman University. You can do this by
|
||||
clicking the `City` tab on the left-hand navigation menu, or you can use the
|
||||
@@ -361,8 +366,8 @@ Since studying at Rothman University earns you 1 experience per second, this wil
|
||||
Editing our Hacking Script
|
||||
--------------------------
|
||||
Now that we have a hacking level of 10, we can hack the :code:`joesguns` server. This server
|
||||
will be slightly more profitable than :code:`foodnstuff`. Therefore, we want to change our hacking
|
||||
script to target :code:`joesguns` instead of :code:`foodnstuff`.
|
||||
will be slightly more profitable than :code:`n00dles`. Therefore, we want to change our hacking
|
||||
script to target :code:`joesguns` instead of :code:`n00dles`.
|
||||
|
||||
Go to |Terminal| and edit the hacking script by entering::
|
||||
|
||||
@@ -515,10 +520,12 @@ will appear that simply says :code:`Work`. Click this to start working.
|
||||
Working at :code:`Joe's Guns` earns $110 per second and also grants some experience
|
||||
for every stat except hacking.
|
||||
|
||||
Working for a company is completely passive. However, you will not be able to do anything
|
||||
else in the game while you work. You can cancel working at any time. You'll notice that
|
||||
cancelling your work early causes you to lose out on some reputation gains, but
|
||||
you shouldn't worry about this. Company reputation isn't important right now.
|
||||
Working for a company is completely passive. You can choose to focus on your work, do
|
||||
something else simultaneously, or switch between those two. While you focus on work,
|
||||
you will not be able to do anything else in the game. If you do something else meanwhile,
|
||||
you will not gain reputation at the same speed. You can cancel working at any time.
|
||||
You'll notice that cancelling your work early causes you to lose out on some reputation
|
||||
gains, but you shouldn't worry about this. Company reputation isn't important right now.
|
||||
|
||||
Once your hacking hits level 75, you can visit :code:`Carmichael Security` in the city
|
||||
and get a software job there. This job offers higher pay and also earns you
|
||||
@@ -715,9 +722,10 @@ navigation menu, and from there select |CyberSec|. In the middle of
|
||||
the page there should be a button for :code:`Hacking Contracts`.
|
||||
Click it to start earning reputation for the |CyberSec| faction (as well
|
||||
as some hacking experience). The higher your hacking level, the more reputation you
|
||||
will gain. Note that while you are working for a faction, you cannot interact with
|
||||
the rest of the game in any way. You can cancel your faction work at any time
|
||||
with no penalty.
|
||||
will gain. Note that while you are working for a faction, you can choose to not interact
|
||||
with the rest of the game in any way to gain reputation at full speed. You can also select to
|
||||
do something else simultaneously, gaining reputation a bit more slowly, until you focus again.
|
||||
You can cancel your faction work at any time with no penalty to your reputation gained so far.
|
||||
|
||||
Purchasing Upgrades and Augmentations
|
||||
-------------------------------------
|
||||
@@ -799,7 +807,7 @@ startup script. Feel free to adjust it to your liking.
|
||||
|
||||
// Array of all servers that don't need any ports opened
|
||||
// to gain root access. These have 16 GB of RAM
|
||||
var servers0Port = ["foodnstuff",
|
||||
var servers0Port = ["n00dles",
|
||||
"sigma-cosmetics",
|
||||
"joesguns",
|
||||
"nectar-net",
|
||||
@@ -869,7 +877,7 @@ Random Tips
|
||||
.. |Keyboard shortcut| replace:: :ref:`Keyboard shortcut <shortcuts>`
|
||||
.. |NUKE| replace:: :code:`NUKE.exe`
|
||||
.. |Terminal| replace:: :code:`Terminal`
|
||||
.. |foodnstuff| replace:: :code:`foodnstuff`
|
||||
.. |n00dles| replace:: :code:`n00dles`
|
||||
.. |harakiri-sushi| replace:: :code:`harakiri-sushi`
|
||||
.. |hong-fang-tea| replace:: :code:`hong-fang-tea`
|
||||
.. |joesguns| replace:: :code:`joesguns`
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
Netscript Basic Functions
|
||||
=========================
|
||||
|
||||
This page contains the complete documentation for all functions that are available in Netscript.
|
||||
This page contains a subset of functions that are available in Bitburner.
|
||||
For the complete list see https://github.com/danielyxie/bitburner/tree/dev/markdown
|
||||
This includes information such as function signatures, what they do, and their return values.
|
||||
|
||||
.. toctree::
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
canPlace() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: canPlace(worldX, worldY, rotation, fragmentId)
|
||||
|
||||
:RAM cost: 0.5 GB
|
||||
:param int worldX: World X against which to align the top left of the fragment.
|
||||
:param int worldY: World Y against which to align the top left of the fragment.
|
||||
:param int rotation: A number from 0 to 3, the mount of 90 degree turn to take.
|
||||
:param int fragmentId: ID of the fragment to place.
|
||||
:returns: `true` if the fragment can be placed at that position. `false` otherwise.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
canPlace(0, 4, 17); // returns true
|
||||
@@ -1,21 +0,0 @@
|
||||
charge() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: charge(worldX, worldY)
|
||||
|
||||
:RAM cost: 0.4 GB
|
||||
:param int worldX: World X of the fragment to charge.
|
||||
:param int worldY: World Y of the fragment to charge.
|
||||
|
||||
Charge a fragment, increasing it's power but also it's heat. The
|
||||
effectiveness of the charge depends on the amount of ram the running script
|
||||
consumes as well as the fragments current heat. This operation takes time to
|
||||
complete.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
charge(0, 4); // Finishes 5 seconds later.
|
||||
.. warning::
|
||||
|
||||
Netscript JS users: This function is `async`
|
||||
@@ -1,13 +0,0 @@
|
||||
clear() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: clear()
|
||||
|
||||
:RAM cost: 0 GB
|
||||
|
||||
Completely clear Stanek's Gift.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
clear(); // No more fragments.
|
||||
@@ -1,16 +0,0 @@
|
||||
deleteAt() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: deleteAt(worldX, worldY)
|
||||
|
||||
:RAM cost: 0.15 GB
|
||||
:param int worldX: World X coordinate of the fragment to delete.
|
||||
:param int worldY: World Y coordinate of the fragment to delete.
|
||||
:returns: `true` if the fragment was deleted. `false` otherwise.
|
||||
|
||||
Delete the fragment located at `[worldX, worldY]`.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
deleteAt(0, 4); // returns true
|
||||
@@ -1,28 +0,0 @@
|
||||
fragmentAt() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: fragmentAt(worldX, worldY)
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:param int worldX: World X coordinate of the fragment.
|
||||
:param int worldY: World Y coordinate of the fragment.
|
||||
:returns: The fragment located at `[worldX, worldY]` in Stanek's Gift, or null.
|
||||
|
||||
.. code-block:: typescript
|
||||
{
|
||||
// In world coordinates
|
||||
x: number;
|
||||
y: number;
|
||||
heat: number;
|
||||
charge: number;
|
||||
id: number;
|
||||
shape: boolean[][];
|
||||
type: string;
|
||||
magnitude: number;
|
||||
limit: number;
|
||||
}
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
var fragment = fragmentAt(0, 4);
|
||||
print(fragment); // {'heat': 50, 'charge': 98}
|
||||
@@ -1,23 +0,0 @@
|
||||
fragmentDefinitions() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: fragmentDefinitions()
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:returns: The list of all fragment that can be embedded in Stanek's Gift.
|
||||
|
||||
.. code-block:: typescript
|
||||
[
|
||||
{
|
||||
id: number;
|
||||
shape: boolean[][];
|
||||
type: string;
|
||||
magnitude: number;
|
||||
limit: number;
|
||||
}
|
||||
]
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
var fragments = fragmentDefinitions();
|
||||
print(fragment); // prints all possible fragments
|
||||
@@ -1,16 +0,0 @@
|
||||
place() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: place(worldX, worldY, fragmentId)
|
||||
|
||||
:RAM cost: 5 GB
|
||||
:param int worldX: World X against which to align the top left of the fragment.
|
||||
:param int worldY: World Y against which to align the top left of the fragment.
|
||||
:param int rotation: A number from 0 to 3, the mount of 90 degree turn to take.
|
||||
:param int fragmentId: ID of the fragment to place.
|
||||
:returns: `true` if the fragment has been placed at that position. `false` otherwise.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
place(0, 4, 17); // returns true
|
||||
@@ -1,26 +0,0 @@
|
||||
placedFragments() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: placedFragments()
|
||||
|
||||
:RAM cost: 5 GB
|
||||
:returns: The list of all fragment that are embedded in Stanek's Gift.
|
||||
|
||||
.. code-block:: typescript
|
||||
[
|
||||
{
|
||||
// In world coordinates
|
||||
x: number;
|
||||
y: number;
|
||||
charge: number;
|
||||
id: number;
|
||||
shape: boolean[][];
|
||||
type: string;
|
||||
power: number;
|
||||
limit: number;
|
||||
}
|
||||
]
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
var myFragments = placedFragments();
|
||||
136614
editor.main.js
Normal file
136614
editor.main.js
Normal file
File diff suppressed because one or more lines are too long
35
electron/achievements.js
Normal file
35
electron/achievements.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const greenworks = require("./greenworks");
|
||||
|
||||
function enableAchievementsInterval(window) {
|
||||
// This is backward but the game fills in an array called `document.achievements` and we retrieve it from
|
||||
// here. Hey if it works it works.
|
||||
const steamAchievements = greenworks.getAchievementNames();
|
||||
const intervalID = setInterval(async () => {
|
||||
try {
|
||||
const playerAchievements = await window.webContents.executeJavaScript("document.achievements");
|
||||
for (const ach of playerAchievements) {
|
||||
if (!steamAchievements.includes(ach)) continue;
|
||||
greenworks.activateAchievement(ach, () => undefined);
|
||||
}
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
|
||||
// The interval probably did not get cleared after a window kill
|
||||
log.warn('Clearing achievements timer');
|
||||
clearInterval(intervalID);
|
||||
return;
|
||||
}
|
||||
}, 1000);
|
||||
window.achievementsIntervalID = intervalID;
|
||||
}
|
||||
|
||||
function disableAchievementsInterval(window) {
|
||||
if (window.achievementsIntervalID) {
|
||||
clearInterval(window.achievementsIntervalID);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
enableAchievementsInterval, disableAchievementsInterval
|
||||
}
|
||||
147
electron/api-server.js
Normal file
147
electron/api-server.js
Normal file
@@ -0,0 +1,147 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const http = require("http");
|
||||
const crypto = require("crypto");
|
||||
const log = require("electron-log");
|
||||
const Config = require("electron-config");
|
||||
const config = new Config();
|
||||
|
||||
let server;
|
||||
let window;
|
||||
|
||||
async function initialize(win) {
|
||||
window = win;
|
||||
server = http.createServer(async function (req, res) {
|
||||
let body = "";
|
||||
|
||||
req.on("data", (chunk) => {
|
||||
body += chunk.toString(); // convert Buffer to string
|
||||
});
|
||||
req.on("end", () => {
|
||||
const providedToken = req.headers?.authorization?.replace('Bearer ', '') ?? '';
|
||||
const isValid = providedToken === getAuthenticationToken();
|
||||
if (isValid) {
|
||||
log.debug('Valid authentication token');
|
||||
} else {
|
||||
log.log('Invalid authentication token');
|
||||
res.writeHead(401);
|
||||
res.write('Invalid authentication token');
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(body);
|
||||
} catch (error) {
|
||||
log.warn(`Invalid body data`);
|
||||
res.writeHead(400);
|
||||
res.write('Invalid body data');
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
if (data) {
|
||||
window.webContents.executeJavaScript(`document.saveFile("${data.filename}", "${data.code}")`).then((result) => {
|
||||
res.write(result);
|
||||
res.end();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const autostart = config.get('autostart', false);
|
||||
if (autostart) {
|
||||
try {
|
||||
await enable()
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
||||
function enable() {
|
||||
if (isListening()) {
|
||||
log.warn('API server already listening');
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const port = config.get('port', 9990);
|
||||
log.log(`Starting http server on port ${port}`);
|
||||
|
||||
// https://stackoverflow.com/a/62289870
|
||||
let startFinished = false;
|
||||
return new Promise((resolve, reject) => {
|
||||
server.listen(port, "127.0.0.1", () => {
|
||||
if (!startFinished) {
|
||||
startFinished = true;
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
server.once('error', (err) => {
|
||||
if (!startFinished) {
|
||||
startFinished = true;
|
||||
console.log(
|
||||
'There was an error starting the server in the error listener:',
|
||||
err
|
||||
);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function disable() {
|
||||
if (!isListening()) {
|
||||
log.warn('API server not listening');
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
log.log('Stopping http server');
|
||||
return server.close();
|
||||
}
|
||||
|
||||
function toggleServer() {
|
||||
if (isListening()) {
|
||||
return disable();
|
||||
} else {
|
||||
return enable();
|
||||
}
|
||||
}
|
||||
|
||||
function isListening() {
|
||||
return server?.listening ?? false;
|
||||
}
|
||||
|
||||
function toggleAutostart() {
|
||||
const newValue = !isAutostart();
|
||||
config.set('autostart', newValue);
|
||||
log.log(`New autostart value is '${newValue}'`);
|
||||
}
|
||||
|
||||
function isAutostart() {
|
||||
return config.get('autostart');
|
||||
}
|
||||
|
||||
function getAuthenticationToken() {
|
||||
const token = config.get('token');
|
||||
if (token) return token;
|
||||
|
||||
const newToken = generateToken();
|
||||
config.set('token', newToken);
|
||||
return newToken;
|
||||
}
|
||||
|
||||
function generateToken() {
|
||||
const buffer = crypto.randomBytes(48);
|
||||
return buffer.toString('base64')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
initialize,
|
||||
enable, disable, toggleServer,
|
||||
toggleAutostart, isAutostart,
|
||||
getAuthenticationToken, isListening,
|
||||
}
|
||||
30
electron/exit.html
Normal file
30
electron/exit.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Bitburner</title>
|
||||
<link rel="stylesheet" href="main.css" />
|
||||
<style>
|
||||
body {
|
||||
background-color: black;
|
||||
color: #0c0;
|
||||
}
|
||||
|
||||
div {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Exiting ...</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
30
electron/export.html
Normal file
30
electron/export.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Bitburner</title>
|
||||
<link rel="stylesheet" href="main.css" />
|
||||
<style>
|
||||
body {
|
||||
background-color: black;
|
||||
color: #0c0;
|
||||
}
|
||||
|
||||
div {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Close me when operation is completed.</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
56
electron/gameWindow.js
Normal file
56
electron/gameWindow.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { app, BrowserWindow } = require("electron");
|
||||
const log = require("electron-log");
|
||||
const utils = require("./utils");
|
||||
const achievements = require("./achievements");
|
||||
const menu = require("./menu");
|
||||
const api = require("./api-server");
|
||||
|
||||
const debug = process.argv.includes("--debug");
|
||||
|
||||
async function createWindow(killall) {
|
||||
const setStopProcessHandler = global.app_handlers.stopProcess
|
||||
const window = new BrowserWindow({
|
||||
show: false,
|
||||
backgroundThrottling: false,
|
||||
backgroundColor: "#000000",
|
||||
});
|
||||
|
||||
window.removeMenu();
|
||||
window.maximize();
|
||||
noScripts = killall ? { query: { noScripts: killall } } : {};
|
||||
window.loadFile("index.html", noScripts);
|
||||
window.show();
|
||||
if (debug) window.webContents.openDevTools();
|
||||
|
||||
window.webContents.on("new-window", function (e, url) {
|
||||
// make sure local urls stay in electron perimeter
|
||||
if (url.substr(0, "file://".length) === "file://") {
|
||||
return;
|
||||
}
|
||||
|
||||
// and open every other protocols on the browser
|
||||
e.preventDefault();
|
||||
utils.openExternal(url);
|
||||
});
|
||||
window.webContents.backgroundThrottling = false;
|
||||
|
||||
achievements.enableAchievementsInterval(window);
|
||||
utils.attachUnresponsiveAppHandler(window);
|
||||
|
||||
try {
|
||||
await api.initialize(window);
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
utils.showErrorBox('Error starting http server', error);
|
||||
}
|
||||
|
||||
menu.refreshMenu(window);
|
||||
setStopProcessHandler(app, window, true);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createWindow,
|
||||
}
|
||||
168
electron/main.js
168
electron/main.js
@@ -1,78 +1,116 @@
|
||||
const { app, BrowserWindow, Menu, globalShortcut, shell } = require("electron");
|
||||
/* eslint-disable no-process-exit */
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { app, dialog, BrowserWindow } = require("electron");
|
||||
const log = require("electron-log");
|
||||
const greenworks = require("./greenworks");
|
||||
const api = require("./api-server");
|
||||
const gameWindow = require("./gameWindow");
|
||||
const achievements = require("./achievements");
|
||||
const utils = require("./utils");
|
||||
|
||||
log.catchErrors();
|
||||
log.info(`Started app: ${JSON.stringify(process.argv)}`);
|
||||
|
||||
process.on('uncaughtException', function () {
|
||||
// The exception will already have been logged by electron-log
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
if (greenworks.init()) {
|
||||
console.log("Steam API has been initialized.");
|
||||
log.info("Steam API has been initialized.");
|
||||
} else {
|
||||
console.log("Steam API has failed to initialize.");
|
||||
log.warn("Steam API has failed to initialize.");
|
||||
}
|
||||
|
||||
const debug = false;
|
||||
|
||||
function createWindow() {
|
||||
const win = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
devTools: debug,
|
||||
},
|
||||
});
|
||||
|
||||
win.removeMenu();
|
||||
win.maximize();
|
||||
win.loadFile("index.html");
|
||||
win.show();
|
||||
if (debug) win.webContents.openDevTools();
|
||||
globalShortcut.register("f5", function () {
|
||||
win.loadFile("index.html");
|
||||
});
|
||||
globalShortcut.register("f8", function () {
|
||||
win.loadFile("index.html", { query: { noScripts: "true" } });
|
||||
});
|
||||
|
||||
win.webContents.on("new-window", function (e, url) {
|
||||
// make sure local urls stay in electron perimeter
|
||||
if (url.substr(0, "file://".length) === "file://") {
|
||||
return;
|
||||
}
|
||||
|
||||
// and open every other protocols on the browser
|
||||
function setStopProcessHandler(app, window, enabled) {
|
||||
const closingWindowHandler = async (e) => {
|
||||
// We need to prevent the default closing event to add custom logic
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
|
||||
// Create the Application's main menu
|
||||
Menu.setApplicationMenu(
|
||||
Menu.buildFromTemplate([
|
||||
{
|
||||
label: "Edit",
|
||||
submenu: [
|
||||
{ label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
|
||||
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
|
||||
{ type: "separator" },
|
||||
{ label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
|
||||
{ label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
|
||||
{ label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
|
||||
{ label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" },
|
||||
],
|
||||
},
|
||||
]),
|
||||
);
|
||||
// First we clear the achievement timer
|
||||
achievements.disableAchievementsInterval(window);
|
||||
|
||||
// This is backward but the game fills in an array called `document.achievements` and we retrieve it from
|
||||
// here. Hey if it works it works.
|
||||
const achievements = greenworks.getAchievementNames();
|
||||
// for (const ach of achievements) {
|
||||
// greenworks.clearAchievement(ach, () => undefined);
|
||||
// }
|
||||
setInterval(async () => {
|
||||
const achs = await win.webContents.executeJavaScript("document.achievements");
|
||||
for (const ach of achs) {
|
||||
if (!achievements.includes(ach)) continue;
|
||||
greenworks.activateAchievement(ach, () => undefined);
|
||||
// Shutdown the http server
|
||||
api.disable();
|
||||
|
||||
// Because of a steam limitation, if the player has launched an external browser,
|
||||
// steam will keep displaying the game as "Running" in their UI as long as the browser is up.
|
||||
// So we'll alert the player to close their browser.
|
||||
if (global.app_playerOpenedExternalLink) {
|
||||
await dialog.showMessageBox({
|
||||
title: 'Bitburner',
|
||||
message: 'You may have to close your browser to properly exit the game.',
|
||||
detail: 'Steam will keep tracking Bitburner as "Running" if any process started within the game is still running.' +
|
||||
' This includes launching an external link, which opens up your browser.',
|
||||
type: 'warning', buttons: ['OK']
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
// We'll try to execute javascript on the page to see if we're stuck
|
||||
let canRunJS = false;
|
||||
window.webContents.executeJavaScript('window.stop(); document.close()', true)
|
||||
.then(() => canRunJS = true);
|
||||
setTimeout(() => {
|
||||
// Wait a few milliseconds to prevent a race condition before loading the exit screen
|
||||
window.webContents.stop();
|
||||
window.loadFile("exit.html")
|
||||
}, 20);
|
||||
|
||||
// Wait 200ms, if the promise has not yet resolved, let's crash the process since we're possibly in a stuck scenario
|
||||
setTimeout(() => {
|
||||
if (!canRunJS) {
|
||||
// We're stuck, let's crash the process
|
||||
log.warn('Forcefully crashing the renderer process');
|
||||
window.webContents.forcefullyCrashRenderer();
|
||||
}
|
||||
|
||||
log.debug('Destroying the window');
|
||||
window.destroy();
|
||||
}, 200);
|
||||
}
|
||||
|
||||
const clearWindowHandler = () => {
|
||||
window = null;
|
||||
};
|
||||
|
||||
const stopProcessHandler = () => {
|
||||
log.info('Quitting the app...');
|
||||
app.isQuiting = true;
|
||||
app.quit();
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
if (enabled) {
|
||||
log.debug('Adding closing handlers');
|
||||
window.on("closed", clearWindowHandler);
|
||||
window.on("close", closingWindowHandler)
|
||||
app.on("window-all-closed", stopProcessHandler);
|
||||
} else {
|
||||
log.debug('Removing closing handlers');
|
||||
window.removeListener("closed", clearWindowHandler);
|
||||
window.removeListener("close", closingWindowHandler);
|
||||
app.removeListener("window-all-closed", stopProcessHandler);
|
||||
}
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow();
|
||||
function startWindow(noScript) {
|
||||
gameWindow.createWindow(noScript);
|
||||
}
|
||||
|
||||
global.app_handlers = {
|
||||
stopProcess: setStopProcessHandler,
|
||||
createWindow: startWindow,
|
||||
}
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
log.info('Application is ready!');
|
||||
|
||||
if (process.argv.includes("--export-save")) {
|
||||
const window = new BrowserWindow({ show: false });
|
||||
await window.loadFile("export.html", false);
|
||||
window.show();
|
||||
setStopProcessHandler(app, window, true);
|
||||
await utils.exportSave(window);
|
||||
} else {
|
||||
startWindow(process.argv.includes("--no-scripts"));
|
||||
}
|
||||
});
|
||||
|
||||
140
electron/menu.js
Normal file
140
electron/menu.js
Normal file
@@ -0,0 +1,140 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { Menu, clipboard, dialog } = require("electron");
|
||||
const log = require("electron-log");
|
||||
const api = require("./api-server");
|
||||
const utils = require("./utils");
|
||||
|
||||
function getMenu(window) {
|
||||
return Menu.buildFromTemplate([
|
||||
{
|
||||
label: "Edit",
|
||||
submenu: [
|
||||
{ label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
|
||||
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
|
||||
{ type: "separator" },
|
||||
{ label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
|
||||
{ label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
|
||||
{ label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
|
||||
{ label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Reloads",
|
||||
submenu: [
|
||||
{
|
||||
label: "Reload",
|
||||
accelerator: "f5",
|
||||
click: () => window.loadFile("index.html"),
|
||||
},
|
||||
{
|
||||
label: "Reload & Kill All Scripts",
|
||||
click: () => utils.reloadAndKill(window, true),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Fullscreen",
|
||||
submenu: [
|
||||
{
|
||||
label: "Toggle",
|
||||
accelerator: "f9",
|
||||
click: (() => {
|
||||
let full = false;
|
||||
return () => {
|
||||
full = !full;
|
||||
window.setFullScreen(full);
|
||||
};
|
||||
})(),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "API Server",
|
||||
submenu: [
|
||||
{
|
||||
label: api.isListening() ? 'Disable Server' : 'Enable Server',
|
||||
click: (async () => {
|
||||
let success = false;
|
||||
try {
|
||||
await api.toggleServer();
|
||||
success = true;
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
utils.showErrorBox('Error Toggling Server', error);
|
||||
}
|
||||
if (success && api.isListening()) {
|
||||
utils.writeToast(window, "Started API Server", "success");
|
||||
} else if (success && !api.isListening()) {
|
||||
utils.writeToast(window, "Stopped API Server", "success");
|
||||
} else {
|
||||
utils.writeToast(window, 'Error Toggling Server', "error");
|
||||
}
|
||||
refreshMenu(window);
|
||||
})
|
||||
},
|
||||
{
|
||||
label: api.isAutostart() ? 'Disable Autostart' : 'Enable Autostart',
|
||||
click: (async () => {
|
||||
api.toggleAutostart();
|
||||
if (api.isAutostart()) {
|
||||
utils.writeToast(window, "Enabled API Server Autostart", "success");
|
||||
} else {
|
||||
utils.writeToast(window, "Disabled API Server Autostart", "success");
|
||||
}
|
||||
refreshMenu(window);
|
||||
})
|
||||
},
|
||||
{
|
||||
label: 'Copy Auth Token',
|
||||
click: (async () => {
|
||||
const token = api.getAuthenticationToken();
|
||||
log.log('Wrote authentication token to clipboard');
|
||||
clipboard.writeText(token);
|
||||
utils.writeToast(window, "Copied Authentication Token to Clipboard", "info");
|
||||
})
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Information',
|
||||
click: () => {
|
||||
dialog.showMessageBox({
|
||||
type: 'info',
|
||||
title: 'Bitburner > API Server Information',
|
||||
message: 'The API Server is used to write script files to your in-game home.',
|
||||
detail: 'There is an official Visual Studio Code extension that makes use of that feature.\n\n' +
|
||||
'It allows you to write your script file in an external IDE and have them pushed over to the game automatically.\n' +
|
||||
'If you want more information, head over to: https://github.com/bitburner-official/bitburner-vscode.',
|
||||
buttons: ['Dismiss', 'Open Extension Link (GitHub)'],
|
||||
defaultId: 0,
|
||||
cancelId: 0,
|
||||
noLink: true,
|
||||
}).then(({response}) => {
|
||||
if (response === 1) {
|
||||
utils.openExternal('https://github.com/bitburner-official/bitburner-vscode');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Debug",
|
||||
submenu: [
|
||||
{
|
||||
label: "Activate",
|
||||
click: () => window.webContents.openDevTools(),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
function refreshMenu(window) {
|
||||
Menu.setApplicationMenu(getMenu(window));
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getMenu, refreshMenu,
|
||||
}
|
||||
325
electron/package-lock.json
generated
Normal file
325
electron/package-lock.json
generated
Normal file
@@ -0,0 +1,325 @@
|
||||
{
|
||||
"name": "bitburner",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bitburner",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"electron-config": "^2.0.0",
|
||||
"electron-log": "^4.4.4"
|
||||
}
|
||||
},
|
||||
"node_modules/conf": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/conf/-/conf-1.4.0.tgz",
|
||||
"integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==",
|
||||
"dependencies": {
|
||||
"dot-prop": "^4.1.0",
|
||||
"env-paths": "^1.0.0",
|
||||
"make-dir": "^1.0.0",
|
||||
"pkg-up": "^2.0.0",
|
||||
"write-file-atomic": "^2.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/dot-prop": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
|
||||
"integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
|
||||
"dependencies": {
|
||||
"is-obj": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/electron-config": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-config/-/electron-config-2.0.0.tgz",
|
||||
"integrity": "sha512-5mGwRK4lsAo6tiy4KNF/zUInYpUGr7JJzLA8FHOoqBWV3kkKJWSrDXo4Uk2Ffm5aeQ1o73XuorfkYhaWFV2O4g==",
|
||||
"deprecated": "Renamed to `electron-store`.",
|
||||
"dependencies": {
|
||||
"conf": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/electron-log": {
|
||||
"version": "4.4.4",
|
||||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.4.4.tgz",
|
||||
"integrity": "sha512-jcNtrVmKXG+CHchLo/jnjjQ9K4/ORguWD23H2nqApTwisQ4Qo3IRQtLiorubajX0Uxg76Xm/Yt+eNfQMoHVr5w=="
|
||||
},
|
||||
"node_modules/env-paths": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
|
||||
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
||||
"dependencies": {
|
||||
"locate-path": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
|
||||
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
|
||||
},
|
||||
"node_modules/imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
||||
"engines": {
|
||||
"node": ">=0.8.19"
|
||||
}
|
||||
},
|
||||
"node_modules/is-obj": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
||||
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
||||
"dependencies": {
|
||||
"p-locate": "^2.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
|
||||
"dependencies": {
|
||||
"pify": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
||||
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
||||
"dependencies": {
|
||||
"p-try": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-locate": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
||||
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
||||
"dependencies": {
|
||||
"p-limit": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-try": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
||||
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/path-exists": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
||||
"integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
|
||||
"dependencies": {
|
||||
"find-up": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
|
||||
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
|
||||
},
|
||||
"node_modules/write-file-atomic": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
|
||||
"integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.11",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"signal-exit": "^3.0.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"conf": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/conf/-/conf-1.4.0.tgz",
|
||||
"integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==",
|
||||
"requires": {
|
||||
"dot-prop": "^4.1.0",
|
||||
"env-paths": "^1.0.0",
|
||||
"make-dir": "^1.0.0",
|
||||
"pkg-up": "^2.0.0",
|
||||
"write-file-atomic": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"dot-prop": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
|
||||
"integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
|
||||
"requires": {
|
||||
"is-obj": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"electron-config": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-config/-/electron-config-2.0.0.tgz",
|
||||
"integrity": "sha512-5mGwRK4lsAo6tiy4KNF/zUInYpUGr7JJzLA8FHOoqBWV3kkKJWSrDXo4Uk2Ffm5aeQ1o73XuorfkYhaWFV2O4g==",
|
||||
"requires": {
|
||||
"conf": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"electron-log": {
|
||||
"version": "4.4.4",
|
||||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.4.4.tgz",
|
||||
"integrity": "sha512-jcNtrVmKXG+CHchLo/jnjjQ9K4/ORguWD23H2nqApTwisQ4Qo3IRQtLiorubajX0Uxg76Xm/Yt+eNfQMoHVr5w=="
|
||||
},
|
||||
"env-paths": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
|
||||
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA="
|
||||
},
|
||||
"find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
||||
"requires": {
|
||||
"locate-path": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
|
||||
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
|
||||
},
|
||||
"imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
|
||||
},
|
||||
"is-obj": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
||||
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
||||
"requires": {
|
||||
"p-locate": "^2.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
|
||||
"requires": {
|
||||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
||||
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
||||
"requires": {
|
||||
"p-try": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
||||
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
||||
"requires": {
|
||||
"p-limit": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
||||
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
|
||||
},
|
||||
"pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
|
||||
},
|
||||
"pkg-up": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
||||
"integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
|
||||
"requires": {
|
||||
"find-up": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
|
||||
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
|
||||
},
|
||||
"write-file-atomic": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
|
||||
"integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.11",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"signal-exit": "^3.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,20 +5,24 @@
|
||||
"main": "main.js",
|
||||
"author": "Daniel Xie & Olivier Gagnon",
|
||||
"mac": {
|
||||
"icon": "./public/icons/mac/icon.icns",
|
||||
"icon": "./public/icons/mac/icon.icns",
|
||||
"category": "public.app-category.games"
|
||||
},
|
||||
"win": {
|
||||
"icon": "./public/icons/png/256x256.png"
|
||||
"icon": "./public/icons/png/256x256.png"
|
||||
},
|
||||
"files": [
|
||||
"./build/**/*",
|
||||
"./dist/**/*",
|
||||
"./node_modules/**/*",
|
||||
"./public/**/*",
|
||||
"./public/**/*",
|
||||
"*.js"
|
||||
],
|
||||
"directories": {
|
||||
"buildResources": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-config": "^2.0.0",
|
||||
"electron-log": "^4.4.4"
|
||||
}
|
||||
}
|
||||
|
||||
116
electron/utils.js
Normal file
116
electron/utils.js
Normal file
@@ -0,0 +1,116 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { app, dialog, shell } = require("electron");
|
||||
const log = require("electron-log");
|
||||
|
||||
const achievements = require("./achievements");
|
||||
const api = require("./api-server");
|
||||
|
||||
function reloadAndKill(window, killScripts) {
|
||||
const setStopProcessHandler = global.app_handlers.stopProcess
|
||||
const createWindowHandler = global.app_handlers.createWindow;
|
||||
|
||||
log.info('Reloading & Killing all scripts...');
|
||||
setStopProcessHandler(app, window, false);
|
||||
|
||||
achievements.disableAchievementsInterval(window);
|
||||
api.disable();
|
||||
|
||||
window.webContents.forcefullyCrashRenderer();
|
||||
window.on('closed', () => {
|
||||
// Wait for window to be closed before opening the new one to prevent race conditions
|
||||
log.debug('Opening new window');
|
||||
createWindowHandler(killScripts);
|
||||
})
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
function promptForReload(window) {
|
||||
detachUnresponsiveAppHandler(window);
|
||||
dialog.showMessageBox({
|
||||
type: 'error',
|
||||
title: 'Bitburner > Application Unresponsive',
|
||||
message: 'The application is unresponsive, possibly due to an infinite loop in your scripts.',
|
||||
detail:' Did you forget a ns.sleep(x)?\n\n' +
|
||||
'The application will be restarted for you, do you want to kill all running scripts?',
|
||||
buttons: ['Restart', 'Cancel'],
|
||||
defaultId: 0,
|
||||
checkboxLabel: 'Kill all running scripts',
|
||||
checkboxChecked: true,
|
||||
noLink: true,
|
||||
}).then(({response, checkboxChecked}) => {
|
||||
if (response === 0) {
|
||||
reloadAndKill(window, checkboxChecked);
|
||||
} else {
|
||||
attachUnresponsiveAppHandler(window);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function attachUnresponsiveAppHandler(window) {
|
||||
window.unresponsiveHandler = () => promptForReload(window);
|
||||
window.on('unresponsive', window.unresponsiveHandler);
|
||||
}
|
||||
|
||||
function detachUnresponsiveAppHandler(window) {
|
||||
window.off('unresponsive', window.unresponsiveHandler);
|
||||
}
|
||||
|
||||
function showErrorBox(title, error) {
|
||||
dialog.showErrorBox(
|
||||
title,
|
||||
`${error.name}\n\n${error.message}`
|
||||
);
|
||||
}
|
||||
|
||||
function exportSaveFromIndexedDb() {
|
||||
return new Promise((resolve) => {
|
||||
const dbRequest = indexedDB.open("bitburnerSave");
|
||||
dbRequest.onsuccess = () => {
|
||||
const db = dbRequest.result;
|
||||
const transaction = db.transaction(['savestring'], "readonly");
|
||||
const store = transaction.objectStore('savestring');
|
||||
const request = store.get('save');
|
||||
request.onsuccess = () => {
|
||||
const file = new Blob([request.result], {type: 'text/plain'});
|
||||
const a = document.createElement("a");
|
||||
const url = URL.createObjectURL(file);
|
||||
a.href = url;
|
||||
a.download = 'save.json';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(a);
|
||||
window.URL.revokeObjectURL(url);
|
||||
resolve();
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function exportSave(window) {
|
||||
await window.webContents
|
||||
.executeJavaScript(`${exportSaveFromIndexedDb.toString()}; exportSaveFromIndexedDb();`, true);
|
||||
}
|
||||
|
||||
async function writeTerminal(window, message, type = null) {
|
||||
await window.webContents
|
||||
.executeJavaScript(`window.appNotifier.terminal("${message}", "${type}");`, true)
|
||||
}
|
||||
|
||||
async function writeToast(window, message, type = "info", duration = 2000) {
|
||||
await window.webContents
|
||||
.executeJavaScript(`window.appNotifier.toast("${message}", "${type}", ${duration});`, true)
|
||||
}
|
||||
|
||||
function openExternal(url) {
|
||||
shell.openExternal(url);
|
||||
global.app_playerOpenedExternalLink = true;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
reloadAndKill, showErrorBox, exportSave,
|
||||
attachUnresponsiveAppHandler, detachUnresponsiveAppHandler,
|
||||
openExternal, writeTerminal, writeToast,
|
||||
}
|
||||
12
index.html
12
index.html
@@ -13,6 +13,18 @@
|
||||
<meta name="msapplication-TileColor" content="#000000"/>
|
||||
<meta name="msapplication-config" content="dist/browserconfig.xml"/>
|
||||
<meta name="theme-color" content="#ffffff"/>
|
||||
<!-- MONACO JS -->
|
||||
<link rel="stylesheet" data-name="vs/editor/editor.main" href="dist/ext/monaco-editor/min/vs/editor/editor.main.css"/>
|
||||
|
||||
<script>
|
||||
var require = { paths: { vs: "dist/ext/monaco-editor/min/vs", "monaco-vim": "dist/ext/monaco-vim" } };
|
||||
</script>
|
||||
|
||||
<script src="dist/ext/monaco-editor/min/vs/loader.js"></script>
|
||||
<script src="dist/ext/monaco-editor/min/vs/editor/editor.main.nls.js"></script>
|
||||
<script src="dist/ext/monaco-editor/min/vs/editor/editor.main.js"></script>
|
||||
<script src="dist/ext/monaco-vim.js"></script>
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,8 @@ module.exports = {
|
||||
transform: {
|
||||
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
|
||||
},
|
||||
// testMatch: ["**/?(*.)+(test).[jt]s?(x)"],
|
||||
testPathIgnorePatterns: [
|
||||
'.cypress', 'node_modules', 'dist',
|
||||
],
|
||||
testEnvironment: "jsdom",
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@ Get the input data.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getData(filename: string, host?: string): string;
|
||||
getData(filename: string, host?: string): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -21,9 +21,9 @@ getData(filename: string, host?: string): string;
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
string
|
||||
any
|
||||
|
||||
The specified contract’s data;
|
||||
The specified contract’s data, data type depends on contract type.;
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
25
markdown/bitburner.corporation.expandcity.md
Normal file
25
markdown/bitburner.corporation.expandcity.md
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [expandCity](./bitburner.corporation.expandcity.md)
|
||||
|
||||
## Corporation.expandCity() method
|
||||
|
||||
Expand to a new city
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
expandCity(divisionName: string, cityName: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
| cityName | string | Name of the city |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
25
markdown/bitburner.corporation.expandindustry.md
Normal file
25
markdown/bitburner.corporation.expandindustry.md
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [expandIndustry](./bitburner.corporation.expandindustry.md)
|
||||
|
||||
## Corporation.expandIndustry() method
|
||||
|
||||
Expand to a new industry
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
expandIndustry(industryType: string, divisionName: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| industryType | string | Name of the industry |
|
||||
| divisionName | string | Name of the division |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
19
markdown/bitburner.corporation.getcorporation.md
Normal file
19
markdown/bitburner.corporation.getcorporation.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) > [Corporation](./bitburner.corporation.md) > [getCorporation](./bitburner.corporation.getcorporation.md)
|
||||
|
||||
## Corporation.getCorporation() method
|
||||
|
||||
Get corporation data
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getCorporation(): CorporationInfo;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
[CorporationInfo](./bitburner.corporationinfo.md)
|
||||
|
||||
Corporation data
|
||||
|
||||
26
markdown/bitburner.corporation.getdivision.md
Normal file
26
markdown/bitburner.corporation.getdivision.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) > [Corporation](./bitburner.corporation.md) > [getDivision](./bitburner.corporation.getdivision.md)
|
||||
|
||||
## Corporation.getDivision() method
|
||||
|
||||
Get division data
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getDivision(divisionName: string): Division;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
[Division](./bitburner.division.md)
|
||||
|
||||
Division data
|
||||
|
||||
24
markdown/bitburner.corporation.issuedividends.md
Normal file
24
markdown/bitburner.corporation.issuedividends.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) > [Corporation](./bitburner.corporation.md) > [issueDividends](./bitburner.corporation.issuedividends.md)
|
||||
|
||||
## Corporation.issueDividends() method
|
||||
|
||||
Issue dividends
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
issueDividends(percent: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| percent | number | Percent of profit to issue as dividends. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
24
markdown/bitburner.corporation.levelupgrade.md
Normal file
24
markdown/bitburner.corporation.levelupgrade.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) > [Corporation](./bitburner.corporation.md) > [levelUpgrade](./bitburner.corporation.levelupgrade.md)
|
||||
|
||||
## Corporation.levelUpgrade() method
|
||||
|
||||
Level an upgrade.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
levelUpgrade(upgradeName: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| upgradeName | string | Name of the upgrade |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
27
markdown/bitburner.corporation.md
Normal file
27
markdown/bitburner.corporation.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) > [Corporation](./bitburner.corporation.md)
|
||||
|
||||
## Corporation interface
|
||||
|
||||
Corporation API
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Corporation extends WarehouseAPI, OfficeAPI
|
||||
```
|
||||
<b>Extends:</b> [WarehouseAPI](./bitburner.warehouseapi.md)<!-- -->, [OfficeAPI](./bitburner.officeapi.md)
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [expandCity(divisionName, cityName)](./bitburner.corporation.expandcity.md) | Expand to a new city |
|
||||
| [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry |
|
||||
| [getCorporation()](./bitburner.corporation.getcorporation.md) | Get corporation data |
|
||||
| [getDivision(divisionName)](./bitburner.corporation.getdivision.md) | Get division data |
|
||||
| [issueDividends(percent)](./bitburner.corporation.issuedividends.md) | Issue dividends |
|
||||
| [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level an upgrade. |
|
||||
| [unlockUpgrade(upgradeName)](./bitburner.corporation.unlockupgrade.md) | Unlock an upgrade. |
|
||||
|
||||
24
markdown/bitburner.corporation.unlockupgrade.md
Normal file
24
markdown/bitburner.corporation.unlockupgrade.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) > [Corporation](./bitburner.corporation.md) > [unlockUpgrade](./bitburner.corporation.unlockupgrade.md)
|
||||
|
||||
## Corporation.unlockUpgrade() method
|
||||
|
||||
Unlock an upgrade.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
unlockUpgrade(upgradeName: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| upgradeName | string | Name of the upgrade |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
13
markdown/bitburner.corporationinfo.expenses.md
Normal file
13
markdown/bitburner.corporationinfo.expenses.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [expenses](./bitburner.corporationinfo.expenses.md)
|
||||
|
||||
## CorporationInfo.expenses property
|
||||
|
||||
Expenses per second this cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
expenses: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.funds.md
Normal file
13
markdown/bitburner.corporationinfo.funds.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [funds](./bitburner.corporationinfo.funds.md)
|
||||
|
||||
## CorporationInfo.funds property
|
||||
|
||||
Funds available
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
funds: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.issuedshares.md
Normal file
13
markdown/bitburner.corporationinfo.issuedshares.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [issuedShares](./bitburner.corporationinfo.issuedshares.md)
|
||||
|
||||
## CorporationInfo.issuedShares property
|
||||
|
||||
Amount of shares issued
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
issuedShares: number;
|
||||
```
|
||||
30
markdown/bitburner.corporationinfo.md
Normal file
30
markdown/bitburner.corporationinfo.md
Normal file
@@ -0,0 +1,30 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CorporationInfo](./bitburner.corporationinfo.md)
|
||||
|
||||
## CorporationInfo interface
|
||||
|
||||
General info about a corporation
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
interface CorporationInfo
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [expenses](./bitburner.corporationinfo.expenses.md) | number | Expenses per second this cycle |
|
||||
| [funds](./bitburner.corporationinfo.funds.md) | number | Funds available |
|
||||
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | number | Amount of shares issued |
|
||||
| [name](./bitburner.corporationinfo.name.md) | string | Name of the corporation |
|
||||
| [numShares](./bitburner.corporationinfo.numshares.md) | number | Amount of share owned |
|
||||
| [public](./bitburner.corporationinfo.public.md) | boolean | Is the company is public |
|
||||
| [revenue](./bitburner.corporationinfo.revenue.md) | number | Revenue per second this cycle |
|
||||
| [sharePrice](./bitburner.corporationinfo.shareprice.md) | number | Price of the shares |
|
||||
| [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md) | number | Cooldown until shares can be sold again |
|
||||
| [state](./bitburner.corporationinfo.state.md) | string | State of the corporation, like PRODUCTION or EXPORT |
|
||||
| [totalShares](./bitburner.corporationinfo.totalshares.md) | number | Total number of shares issues by this corporation |
|
||||
|
||||
13
markdown/bitburner.corporationinfo.name.md
Normal file
13
markdown/bitburner.corporationinfo.name.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [name](./bitburner.corporationinfo.name.md)
|
||||
|
||||
## CorporationInfo.name property
|
||||
|
||||
Name of the corporation
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
name: string;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.numshares.md
Normal file
13
markdown/bitburner.corporationinfo.numshares.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [numShares](./bitburner.corporationinfo.numshares.md)
|
||||
|
||||
## CorporationInfo.numShares property
|
||||
|
||||
Amount of share owned
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
numShares: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.public.md
Normal file
13
markdown/bitburner.corporationinfo.public.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [public](./bitburner.corporationinfo.public.md)
|
||||
|
||||
## CorporationInfo.public property
|
||||
|
||||
Is the company is public
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
public: boolean;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.revenue.md
Normal file
13
markdown/bitburner.corporationinfo.revenue.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [revenue](./bitburner.corporationinfo.revenue.md)
|
||||
|
||||
## CorporationInfo.revenue property
|
||||
|
||||
Revenue per second this cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
revenue: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.shareprice.md
Normal file
13
markdown/bitburner.corporationinfo.shareprice.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [sharePrice](./bitburner.corporationinfo.shareprice.md)
|
||||
|
||||
## CorporationInfo.sharePrice property
|
||||
|
||||
Price of the shares
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
sharePrice: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.sharesalecooldown.md
Normal file
13
markdown/bitburner.corporationinfo.sharesalecooldown.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md)
|
||||
|
||||
## CorporationInfo.shareSaleCooldown property
|
||||
|
||||
Cooldown until shares can be sold again
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
shareSaleCooldown: number;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.state.md
Normal file
13
markdown/bitburner.corporationinfo.state.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [state](./bitburner.corporationinfo.state.md)
|
||||
|
||||
## CorporationInfo.state property
|
||||
|
||||
State of the corporation, like PRODUCTION or EXPORT
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
state: string;
|
||||
```
|
||||
13
markdown/bitburner.corporationinfo.totalshares.md
Normal file
13
markdown/bitburner.corporationinfo.totalshares.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) > [CorporationInfo](./bitburner.corporationinfo.md) > [totalShares](./bitburner.corporationinfo.totalshares.md)
|
||||
|
||||
## CorporationInfo.totalShares property
|
||||
|
||||
Total number of shares issues by this corporation
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
totalShares: number;
|
||||
```
|
||||
13
markdown/bitburner.division.awareness.md
Normal file
13
markdown/bitburner.division.awareness.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) > [Division](./bitburner.division.md) > [awareness](./bitburner.division.awareness.md)
|
||||
|
||||
## Division.awareness property
|
||||
|
||||
Awareness of the division
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
awareness: number;
|
||||
```
|
||||
13
markdown/bitburner.division.cities.md
Normal file
13
markdown/bitburner.division.cities.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) > [Division](./bitburner.division.md) > [cities](./bitburner.division.cities.md)
|
||||
|
||||
## Division.cities property
|
||||
|
||||
Cities in which this division has expanded
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
cities: string[];
|
||||
```
|
||||
13
markdown/bitburner.division.lastcycleexpenses.md
Normal file
13
markdown/bitburner.division.lastcycleexpenses.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) > [Division](./bitburner.division.md) > [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md)
|
||||
|
||||
## Division.lastCycleExpenses property
|
||||
|
||||
Expenses last cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
lastCycleExpenses: number;
|
||||
```
|
||||
13
markdown/bitburner.division.lastcyclerevenue.md
Normal file
13
markdown/bitburner.division.lastcyclerevenue.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) > [Division](./bitburner.division.md) > [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md)
|
||||
|
||||
## Division.lastCycleRevenue property
|
||||
|
||||
Revenue last cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
lastCycleRevenue: number;
|
||||
```
|
||||
31
markdown/bitburner.division.md
Normal file
31
markdown/bitburner.division.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) > [Division](./bitburner.division.md)
|
||||
|
||||
## Division interface
|
||||
|
||||
Corporation division
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
interface Division
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [awareness](./bitburner.division.awareness.md) | number | Awareness of the division |
|
||||
| [cities](./bitburner.division.cities.md) | string\[\] | Cities in which this division has expanded |
|
||||
| [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md) | number | Expenses last cycle |
|
||||
| [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md) | number | Revenue last cycle |
|
||||
| [name](./bitburner.division.name.md) | string | Name of the division |
|
||||
| [popularity](./bitburner.division.popularity.md) | number | Popularity of the division |
|
||||
| [prodMult](./bitburner.division.prodmult.md) | number | Production multiplier |
|
||||
| [research](./bitburner.division.research.md) | number | Amount of research in that division |
|
||||
| [thisCycleExpenses](./bitburner.division.thiscycleexpenses.md) | number | Expenses this cycle |
|
||||
| [thisCycleRevenue](./bitburner.division.thiscyclerevenue.md) | number | Revenue this cycle |
|
||||
| [type](./bitburner.division.type.md) | string | Type of division, like Aggriculture |
|
||||
| [upgrades](./bitburner.division.upgrades.md) | number\[\] | All research bought |
|
||||
|
||||
13
markdown/bitburner.division.name.md
Normal file
13
markdown/bitburner.division.name.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) > [Division](./bitburner.division.md) > [name](./bitburner.division.name.md)
|
||||
|
||||
## Division.name property
|
||||
|
||||
Name of the division
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
name: string;
|
||||
```
|
||||
13
markdown/bitburner.division.popularity.md
Normal file
13
markdown/bitburner.division.popularity.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) > [Division](./bitburner.division.md) > [popularity](./bitburner.division.popularity.md)
|
||||
|
||||
## Division.popularity property
|
||||
|
||||
Popularity of the division
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
popularity: number;
|
||||
```
|
||||
13
markdown/bitburner.division.prodmult.md
Normal file
13
markdown/bitburner.division.prodmult.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) > [Division](./bitburner.division.md) > [prodMult](./bitburner.division.prodmult.md)
|
||||
|
||||
## Division.prodMult property
|
||||
|
||||
Production multiplier
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
prodMult: number;
|
||||
```
|
||||
13
markdown/bitburner.division.research.md
Normal file
13
markdown/bitburner.division.research.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) > [Division](./bitburner.division.md) > [research](./bitburner.division.research.md)
|
||||
|
||||
## Division.research property
|
||||
|
||||
Amount of research in that division
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
research: number;
|
||||
```
|
||||
13
markdown/bitburner.division.thiscycleexpenses.md
Normal file
13
markdown/bitburner.division.thiscycleexpenses.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) > [Division](./bitburner.division.md) > [thisCycleExpenses](./bitburner.division.thiscycleexpenses.md)
|
||||
|
||||
## Division.thisCycleExpenses property
|
||||
|
||||
Expenses this cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
thisCycleExpenses: number;
|
||||
```
|
||||
13
markdown/bitburner.division.thiscyclerevenue.md
Normal file
13
markdown/bitburner.division.thiscyclerevenue.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) > [Division](./bitburner.division.md) > [thisCycleRevenue](./bitburner.division.thiscyclerevenue.md)
|
||||
|
||||
## Division.thisCycleRevenue property
|
||||
|
||||
Revenue this cycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
thisCycleRevenue: number;
|
||||
```
|
||||
13
markdown/bitburner.division.type.md
Normal file
13
markdown/bitburner.division.type.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) > [Division](./bitburner.division.md) > [type](./bitburner.division.type.md)
|
||||
|
||||
## Division.type property
|
||||
|
||||
Type of division, like Aggriculture
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: string;
|
||||
```
|
||||
13
markdown/bitburner.division.upgrades.md
Normal file
13
markdown/bitburner.division.upgrades.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) > [Division](./bitburner.division.md) > [upgrades](./bitburner.division.upgrades.md)
|
||||
|
||||
## Division.upgrades property
|
||||
|
||||
All research bought
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
upgrades: number[];
|
||||
```
|
||||
11
markdown/bitburner.employee.cha.md
Normal file
11
markdown/bitburner.employee.cha.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) > [Employee](./bitburner.employee.md) > [cha](./bitburner.employee.cha.md)
|
||||
|
||||
## Employee.cha property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
cha: number;
|
||||
```
|
||||
11
markdown/bitburner.employee.cre.md
Normal file
11
markdown/bitburner.employee.cre.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) > [Employee](./bitburner.employee.md) > [cre](./bitburner.employee.cre.md)
|
||||
|
||||
## Employee.cre property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
cre: number;
|
||||
```
|
||||
11
markdown/bitburner.employee.eff.md
Normal file
11
markdown/bitburner.employee.eff.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) > [Employee](./bitburner.employee.md) > [eff](./bitburner.employee.eff.md)
|
||||
|
||||
## Employee.eff property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
eff: number;
|
||||
```
|
||||
13
markdown/bitburner.employee.ene.md
Normal file
13
markdown/bitburner.employee.ene.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) > [Employee](./bitburner.employee.md) > [ene](./bitburner.employee.ene.md)
|
||||
|
||||
## Employee.ene property
|
||||
|
||||
Energy
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
ene: number;
|
||||
```
|
||||
11
markdown/bitburner.employee.exp.md
Normal file
11
markdown/bitburner.employee.exp.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) > [Employee](./bitburner.employee.md) > [exp](./bitburner.employee.exp.md)
|
||||
|
||||
## Employee.exp property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
exp: number;
|
||||
```
|
||||
13
markdown/bitburner.employee.hap.md
Normal file
13
markdown/bitburner.employee.hap.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) > [Employee](./bitburner.employee.md) > [hap](./bitburner.employee.hap.md)
|
||||
|
||||
## Employee.hap property
|
||||
|
||||
Happiness
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
hap: number;
|
||||
```
|
||||
11
markdown/bitburner.employee.int.md
Normal file
11
markdown/bitburner.employee.int.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) > [Employee](./bitburner.employee.md) > [int](./bitburner.employee.int.md)
|
||||
|
||||
## Employee.int property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
int: number;
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user