Compare commits

..

572 Commits

Author SHA1 Message Date
Olivier Gagnon
faf8389bef v1.3 2022-01-04 20:46:10 -05:00
Olivier Gagnon
50919a88cd update doc 2022-01-04 19:12:20 -05:00
Olivier Gagnon
4860d6dc83 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2022-01-04 19:09:38 -05:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
hydroflame
f9fd7a48f8 Merge pull request #2339 from SlyCedix/patch-1
Improve grammar in hacking algorithms readme
2022-01-04 19:04:41 -05:00
hydroflame
07b12ca6fb Merge pull request #2332 from woody-lam-cwl/nuke-runtime-error
Fix #2329 NUKE.exe runtime error
2022-01-04 19:04:11 -05:00
Cyn
707a68dae9 Improve grammar in hacking algorithms readme 2022-01-04 19:03:45 -05:00
hydroflame
1f46d69430 Merge pull request #2334 from woody-lam-cwl/getweakentime-typo
Fix #2330 typo
2022-01-04 19:03:31 -05:00
hydroflame
f2fa7a3c2d Merge pull request #2335 from nickofolas/clickaway-notifications
Allow notifications to be dismissed by clicking
2022-01-04 19:03:05 -05:00
hydroflame
100ac2db95 Merge pull request #2333 from smolgumball/patch-1
Add invite link to Discord
2022-01-04 19:02:49 -05:00
hydroflame
338953fa1a Merge pull request #2338 from MartinFournier/fix/electron-unresponsive-handler
Fix unresponsive handler being attached many times
2022-01-04 19:02:34 -05:00
Martin Fournier
de8e5ef441 Fix unresponsive handler being attached many times 2022-01-04 18:16:07 -05:00
Olivier Gagnon
c06087c634 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2022-01-04 18:03:56 -05:00
Olivier Gagnon
8587625bd6 hacking algos 2022-01-04 18:03:44 -05:00
Woody Lam
c5fb744a39 Merge branch 'getweakentime-typo' of github.com-woody-lam-cwl:woody-lam-cwl/bitburner into getweakentime-typo 2022-01-04 22:40:46 +00:00
Woody Lam
d7cd5b0d96 Fix #2230 typo (again) 2022-01-04 22:40:41 +00:00
nickofolas
c445df4168 Allow notifications to be dismissed by clicking 2022-01-04 16:25:00 -06:00
Woody Lam
f8cba0ddc8 Fix #2330 typo 2022-01-04 21:50:30 +00:00
smolgumball
e3a181faf2 Add invite link to Discord 2022-01-04 14:44:17 -07:00
Woody Lam
f65e546c32 Fix #2329 NUKE.exe runtime error 2022-01-04 21:40:21 +00:00
hydroflame
772317a4f1 Merge pull request #2317 from nickofolas/validate-ram-purchase
Validate RAM amount in ns.purchaseServer()
2022-01-04 12:58:27 -05:00
hydroflame
225de0faf6 Merge pull request #2316 from nickofolas/fix-newline
Fix whitespace in Bladeburner console
2022-01-04 12:57:17 -05:00
hydroflame
0dbb067eae Merge pull request #2318 from nickofolas/fix-throw-undefined
Fix throw {nullish} errors
2022-01-04 12:57:04 -05:00
hydroflame
0d02ce6308 Merge pull request #2326 from MartinFournier/feature/editor-wordwrap-option
Add wordWrap option to Monaco
2022-01-04 12:54:50 -05:00
hydroflame
042189b187 Merge pull request #2324 from Dexalt142/editor-theme-one-dark
feat (editor theme): atom one dark theme
2022-01-04 12:54:34 -05:00
hydroflame
52ca4c177a Merge pull request #2325 from MartinFournier/feature/electron-add-sourcemaps
Include source maps in electron package
2022-01-04 12:54:21 -05:00
hydroflame
b38e411cd0 Merge pull request #2327 from MartinFournier/doc/faq
Update doc & add FAQs
2022-01-04 12:54:06 -05:00
Olivier Gagnon
c9d40ccf95 added new exploit 2022-01-04 12:21:17 -05:00
Martin Fournier
438ae51fcd Add Game Stuck FAQ 2022-01-04 11:11:17 -05:00
Martin Fournier
2747bf4439 Update doc & add FAQs 2022-01-04 11:03:01 -05:00
Olivier Gagnon
dd720897e8 fix tuto 2022-01-04 11:01:45 -05:00
Olivier Gagnon
449df63dd8 fix tuto 2022-01-04 10:58:47 -05:00
Martin Fournier
f0161367af Add wordWrap option to Monaco 2022-01-04 09:41:44 -05:00
Martin Fournier
ac0bcbca8e Include source maps in electron package
This will make the electron dev tools work like the web version.
2022-01-04 08:26:10 -05:00
Dexalt142
914b06ec88 feat (editor theme): atom one dark theme 2022-01-04 18:39:09 +07:00
hydroflame
d5561abd46 Merge pull request #2320 from Kebap/patch-1
fix copy/paste error
2022-01-03 22:26:28 -05:00
Kebap
53e3547d87 move sentence around 2022-01-04 03:09:20 +01:00
Kebap
501cabfdc5 Update bitburner.ns.getweakentime.md 2022-01-04 02:46:47 +01:00
nickofolas
fff1de63d3 Fix throw (nullish) errors 2022-01-03 17:26:22 -06:00
nickofolas
23b21e63a0 Validate RAM amount in ns.purchaseServer() 2022-01-03 17:00:32 -06:00
nickofolas
88db255f29 Fix whitespace in Bladeburner console 2022-01-03 16:42:49 -06:00
Olivier Gagnon
dfae337d26 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2022-01-03 15:49:05 -05:00
Olivier Gagnon
7655b91e2a rm some bullshit 2022-01-03 15:45:56 -05:00
hydroflame
0368456d1e Merge pull request #2313 from MartinFournier/fix/import-save
Fix import save issue with large files
2022-01-03 15:44:53 -05:00
hydroflame
8191716562 Merge pull request #2306 from MartinFournier/fix/storage-tooltip
Fix new lines in corp storage tooltip
2022-01-03 15:44:31 -05:00
hydroflame
3ceed8cf24 Merge pull request #2291 from Kebap/work_simultaneously
Mention doing things simultaneously
2022-01-03 15:44:24 -05:00
hydroflame
69ed320b93 Merge pull request #2287 from daanflore/dev
Saw in vscode that some typedefenitions where not the same as how they work in the game
2022-01-03 15:44:08 -05:00
hydroflame
8e0b5e3ecd Merge pull request #2288 from pan-kuleczka/dev
ns.hackAnalyze definition fix to match markdown
2022-01-03 15:43:48 -05:00
hydroflame
ea3a1e5a2a Merge pull request #2309 from erplsf/dev
fix ns.run args type definition
2022-01-03 15:43:29 -05:00
hydroflame
1372c28a1b Merge pull request #2312 from MartinFournier/feature/electron-toasts
Electron toasts & terminal access + information
2022-01-03 15:43:09 -05:00
hydroflame
b123d191c0 Merge pull request #2289 from nickofolas/patch-1
Update ns.toast() signature
2022-01-03 14:58:21 -05:00
hydroflame
82c963c04e Merge pull request #2315 from ApatheticsAnonymous/Clarify_server_ram_doc
Help clarify the behavior of server RAM to executing a script with mu…
2022-01-03 14:58:11 -05:00
ApatheticsAnonymous
df37f884ed Help clarify the behavior of server RAM to executing a script with multiple threads 2022-01-03 14:21:58 -05:00
Martin Fournier
dfabc0ac11 Fix import save issue with large files
The base64 regex was throwing a maximum stack size exceeded error with
large files.
The whole check was a bit redundant since we already try to parse the
file from base64 just below.
2022-01-03 11:02:29 -05:00
Martin Fournier
6c3618cb65 Check userAgent before running electron init 2022-01-03 10:33:58 -05:00
Martin Fournier
6d8df6744e Add toasts & terminal funcs to electron app
Attach functions to the window object so that the wrapper can executeJs
to display messages to the player
2022-01-03 10:32:01 -05:00
Martin Fournier
bdef14b029 Add API server information menu item 2022-01-03 10:29:56 -05:00
Andriy Mykhaylyk
38923af436 fix ns.run args type definition 2022-01-03 16:10:22 +01:00
Martin Fournier
057a229759 Fix new lines in corp storage tooltip
Use react fragments instead of strings so that the <br /> is not
escaped.
2022-01-03 09:31:07 -05:00
Kebap
5c57bd43f6 Mention doing things simultaneously 2022-01-02 22:20:45 +01:00
daan flore
8c851b577a Adding correct types at run args command 2022-01-02 20:40:57 +01:00
nickofolas
3ac26594db Update ns.toast() signature 2022-01-02 13:11:03 -06:00
daan flore
409fa29b65 Merge branch 'dev' of https://github.com/daanflore/bitburner-1 into dev 2022-01-02 19:24:19 +01:00
daan flore
74ee7f371d String value should also be possible to write 2022-01-02 19:24:16 +01:00
pan-kuleczka
62c19c9078 hackAnalyze definition fix to match markdown 2022-01-02 18:56:52 +01:00
daanflore
f1592a77fb Merge branch 'danielyxie:dev' into dev 2022-01-02 18:55:27 +01:00
daan flore
f8607ce73e Adding dorgotten typescript defenitions to file 2022-01-02 18:54:11 +01:00
Olivier Gagnon
d0214c1fed fix some weird eval 2022-01-02 12:41:54 -05:00
Olivier Gagnon
4fb1dbf2e3 fix some weird eval 2022-01-02 12:13:01 -05:00
Olivier Gagnon
1e0e9f7bd7 change button text 2022-01-02 11:55:06 -05:00
hydroflame
1819e5a98a Merge pull request #2247 from MartinFournier/feature/alert-close-browser
Add warning on game close if user launched external browser
2022-01-02 11:44:56 -05:00
hydroflame
a2d75ae10c Merge branch 'dev' into feature/alert-close-browser 2022-01-02 11:44:47 -05:00
hydroflame
cd9fad06d0 Merge pull request #2231 from ErzengelLichtes/use-numeraljs-for-ram
Use numeral.js to format memory, allow use of GiB with an option
2022-01-02 11:43:33 -05:00
hydroflame
d4eab92ed0 Merge pull request #2224 from MartinFournier/fix/joesguns-symbol
Update JoesGuns StockSymbols to match new key
2022-01-02 11:42:54 -05:00
hydroflame
93c833a211 Merge pull request #2238 from MartinFournier/feature/export-save-flag
Add electron launch option to directly export save game
2022-01-02 11:42:32 -05:00
hydroflame
29aca108fb Merge pull request #2237 from MartinFournier/fix/electron-handlers
Fix: Use global references for electron event handlers
2022-01-02 11:42:15 -05:00
hydroflame
01cb0cca81 Merge pull request #2227 from FaintSpeaker/alias-regex-not-matching-exactly
Alias command regular expression mismatch
2022-01-02 11:41:50 -05:00
hydroflame
a1ec54ff90 Merge pull request #2241 from billyvg/fix/vim-save
fix(editor): Fix vim mode quit and add `wq`
2022-01-02 11:40:40 -05:00
hydroflame
52c82f026c Merge pull request #2240 from JotaroS/stock-market-ui-fix
UI Fix: text style on Investopedia
2022-01-02 11:40:32 -05:00
hydroflame
b80cc31cb0 Merge pull request #2245 from MartinFournier/doc/electron
Add documentation for electron app build
2022-01-02 11:40:17 -05:00
hydroflame
a6be7ecc3e Merge pull request #2243 from TheMas3212/dev
Add Function Call signatures to ns.kill so typescript is able to call ns.kill correctly
2022-01-02 11:39:56 -05:00
hydroflame
1a07399312 Merge pull request #2248 from MartinFournier/feature/confirm-save-import
Add validation & confirm prompt for save import
2022-01-02 11:39:10 -05:00
hydroflame
8cfb355ca2 Merge pull request #2250 from MartinFournier/feature/backdoored-loc-tooltip
Add tooltip on backdoored location name
2022-01-02 11:38:01 -05:00
hydroflame
c5248fabb3 Merge pull request #2249 from MartinFournier/feature/add-themes
Add new community themes from discord
2022-01-02 11:37:51 -05:00
hydroflame
d53b87b8ce Merge pull request #2251 from MartinFournier/fix/corp-storage-tooltip
Fix #2129: Add linebreaks in corp storage tooltips
2022-01-02 11:37:45 -05:00
hydroflame
ca51e2144f Merge pull request #2253 from MartinFournier/fix/disable-alpha-color-picker
Remove alpha from color picker
2022-01-02 11:37:30 -05:00
hydroflame
c8667b5194 Merge pull request #2259 from jhollowe-forks/jhollowe-patch-1
Fix typo in AugmentationHelpers.tsx
2022-01-02 11:37:19 -05:00
hydroflame
4486d7d454 Merge pull request #2266 from TheMas3212/fix-1752
fixes #1752 add check when applying for job to make sure company actually has that job position
2022-01-02 11:36:44 -05:00
hydroflame
7f812f56d9 Merge pull request #2277 from pan-kuleczka/dev
Fixed ambiguous NS.hackAnalyze description
2022-01-02 11:36:14 -05:00
hydroflame
4810a9004d Merge pull request #2283 from jasonhaxstuff/patch-1
docs: update the markdown documentation for commitCrime()
2022-01-02 11:35:52 -05:00
hydroflame
b9b4ee23fe Merge pull request #2270 from thadguidry/patch-1
fix typo for @param host in getScriptRam()
2022-01-02 11:35:38 -05:00
Brandon Bothell
dd4b548917 docs: comma for good measure 2022-01-02 02:40:03 -05:00
Brandon Bothell
5aa08f4123 docs: commitCrime() return millseconds, not seconds 2022-01-02 02:37:25 -05:00
pan-kuleczka
8428264f05 Fixed ambiguous NS.hackAnalyze() description 2022-01-02 01:09:44 +01:00
Thad Guidry
4096ce4a9d fix typo for @param host in getScriptRam() 2022-01-01 14:08:45 -06:00
TheMas3212
1dcde649be fixes #1752 add check when applying for job to make sure company
actually has that job position
2022-01-02 03:08:16 +11:00
John Hollowell
2e0242ccbf Fix typo in AugmentationHelpers.tsx 2021-12-31 18:59:39 -05:00
Martin Fournier
59d8e1f979 Remove alpha from color picker
rgba is not currently supported in the themes, so might as well remove
the option from the picker.
2021-12-31 10:13:53 -05:00
TheMas3212
8707dc7079 remove extra function signature for ns.kill() 2021-12-31 23:33:23 +11:00
TheMas3212
e3e1770439 Fix Typedef for getScriptIncome/getScriptExpGain
Current Typedef does not allow using the run with no arguments for
totals versions
2021-12-31 23:31:46 +11:00
Martin Fournier
c6ec27781b Fix #2129: Add linebreaks in corp storage tooltips 2021-12-31 06:45:49 -05:00
Martin Fournier
50f41e79e6 Add tooltip on backdoored location name 2021-12-31 06:23:52 -05:00
Martin Fournier
2637653d29 Add new community themes from discord 2021-12-31 05:55:46 -05:00
Martin Fournier
2b7464ebb7 Add validation & confirm prompt for save import 2021-12-31 05:32:52 -05:00
Martin Fournier
b402cc7f6e Add warning on game close if user launched browser 2021-12-31 04:22:04 -05:00
Martin Fournier
2189c5b663 Add documentation for electron app build
Also adds a step in the build to run npm install in the electron
subfolder
2021-12-30 21:45:57 -05:00
TheMas3212
f3aed87fa4 Fix Typing on kill in NetscriptFunctions.ts
forgot to mark hostname as optional
2021-12-31 11:12:43 +11:00
TheMas3212
31ed5d8f64 Add Function Call signatures to ns.kill so typescript is able to call
ns.kill(pid)
previously it will fail to compile due to not providing a host argument
2021-12-31 10:58:56 +11:00
Billy Vong
38366e45db fix(editor): Fix vim mode quit and add "wq"
This changes `:q` to be quit (w/o saving) and added `:wq` to save *and* close.
2021-12-30 13:14:54 -05:00
JotaroS
351d4151bb fixed text style Investopedia 2021-12-30 18:50:22 +01:00
Martin Fournier
bc0791840f Add launch option to directly export save game
If --export-save is set, it will not launch the index.html and instead
launch a blank page. It then reads from the IndexedDb to fetch the
bitburnerSave value and prompts a save file dialog.
2021-12-30 11:51:15 -05:00
Martin Fournier
bf1a2b56ba Use global references for electron event handlers
I messed up the handlers reference in the last commit so the events
were not properly attached. Changed it to use global variables for now.
2021-12-30 09:12:55 -05:00
ErzengelLichtes
8f3da16ecf Use numeral.js to format memory, allow use of GiB with an option
numeral.js has a formatter for both kilobyte and kibibyte, so why use a custom formatter that only goes up to exabyte?
Also added a setting to allow people who really want to see GiB to enable that, even if it doesn't make sense.
2021-12-29 15:51:59 -08:00
hydroflame
b578e09986 Merge pull request #2218 from MartinFournier/feature/http-server-auth
Add authorization token to file system api
2021-12-29 14:26:16 -05:00
FaintSpeaker
d823b5f28f Update the addAlias/addGlobalAlias calls to fetch the correct capturing groups. 2021-12-29 14:04:58 -05:00
FaintSpeaker
7a0fdb9ce9 This regular expression expects 7 potential matches.
1: The whole string
2: the alias name
3 & 4: the command text in two locations
5 & 6: the quoted command text in two styles
7: the group that selects between the two qoted styles.
2021-12-29 13:56:26 -05:00
Martin Fournier
1b41e3326e Update JoesGuns StockSymbols to match new key 2021-12-29 12:03:29 -05:00
Olivier Gagnon
72d9770a8e Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-29 12:02:23 -05:00
hydroflame
5c5cc9708d Merge pull request #2172 from theit8514/script-caching
Cache the blobs generated by scripts
2021-12-29 11:53:30 -05:00
hydroflame
636fc7cda0 Merge pull request #2204 from ErzengelLichtes/fix-port-validation
DRY: Consolidated the code for retrieving a port so it will have consistent errors checks.
2021-12-29 11:30:18 -05:00
Martin Fournier
a098289856 Refactor electron app into multiple files
Gracefully handle http-server start error & cleanup logs
2021-12-29 08:46:56 -05:00
Olivier Gagnon
383e56e9c8 floor thread count 2021-12-29 02:51:41 -05:00
hydroflame
91243f4742 Merge pull request #2213 from dou867/dev
fix joes guns org name and stock name do not match.
2021-12-29 02:25:51 -05:00
Olivier Gagnon
04f2cfe522 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-29 02:04:28 -05:00
Olivier Gagnon
0fc95e6215 text editor improvements 2021-12-29 02:04:24 -05:00
hydroflame
9673b6f31d Merge pull request #2170 from theit8514/mv-overwrite
Fix mv overwriting script files
2021-12-29 01:58:37 -05:00
hydroflame
3c3f482e7b Merge pull request #2153 from MartinFournier/fix/sleeves-skill-progress
Fix #2021: Handle sleeves xp in stats overview
2021-12-29 01:54:28 -05:00
Martin Fournier
5d7d72a3e2 Add authorization token to file system api 2021-12-28 15:37:22 -05:00
hydroflame
cc4f07d037 Merge pull request #2175 from Xynrati/patch-3
Removing old comment about removed parameter
2021-12-28 11:59:41 -05:00
hydroflame
6eb8b2adf9 Merge pull request #2214 from alkemann/patch-2
Fixed typo
2021-12-28 11:28:16 -05:00
Alexander Morland
aaf1ad4ae5 Fixed typo
needed to fix docs
2021-12-28 17:27:21 +01:00
Xynrati
ab5a2a8297 Update bitburner.ns.getweakentime.md 2021-12-28 08:07:56 -08:00
Xynrati
f98968f8b2 Update bitburner.ns.getgrowtime.md 2021-12-28 08:07:35 -08:00
dou
1b7a0224c5 fix joes guns org name and stock name do not match. 2021-12-29 03:06:37 +11:00
Xynrati
26ab62eea6 More comments to be removed 2021-12-28 08:04:50 -08:00
hydroflame
9f9ce40ef0 Merge pull request #2179 from antonvmironov/fix-CorporationInfo.state
Fix CorporationInfo.state
2021-12-28 10:37:42 -05:00
hydroflame
39e6c5ca35 Merge pull request #2177 from locriacyber/dev
Add peer dependencies for material-ui-color
2021-12-28 10:37:11 -05:00
hydroflame
39c7a7781a Merge pull request #2162 from mikomyazaki/concise_exp_job_gains
Concise exp job gains
2021-12-28 10:37:01 -05:00
hydroflame
f674d2d253 Merge pull request #2169 from maxtimum/feature/add_grep_option_to_ps
Feature/add grep option to ps
2021-12-28 10:35:26 -05:00
hydroflame
b27bb36a95 Merge pull request #2196 from sporkwitch/dev
Update parseAliasDeclaration to match single quote
2021-12-28 10:34:16 -05:00
hydroflame
329221a974 Merge pull request #2183 from MageKing17/patch-1
Get rid of console spam in NetscriptFunctions.ts
2021-12-28 10:34:01 -05:00
hydroflame
952ea89777 Merge pull request #2185 from MageKing17/patch-2
Allow shortcuts to work while doing unfocused work.
2021-12-28 10:33:16 -05:00
hydroflame
5aff5fc944 Merge pull request #2193 from Frank-py/patch-2
Updated Terminal.tsx to add keypress event.
2021-12-28 10:33:04 -05:00
hydroflame
d181ac4104 Merge pull request #2197 from ReeseJones/fixStockDoc
Changed setting to selling in getSaleGain
2021-12-28 10:32:37 -05:00
hydroflame
e583b46b16 Merge pull request #2202 from amclark42/help-analyze-typo-fix
Fix two typos in `help` command text
2021-12-28 10:32:19 -05:00
hydroflame
8b42703f95 Merge pull request #2199 from theit8514/log-window-improvements
Log window improvements
2021-12-28 10:32:04 -05:00
hydroflame
91d9549999 Merge pull request #2200 from 2PacIsAlive/dev
Fix "Terminal capacity" option description typo
2021-12-28 10:31:06 -05:00
hydroflame
a29ffead78 Merge pull request #2211 from anthonydroberts/buy-all-option
Add buy all option to buy terminal command
2021-12-28 10:30:54 -05:00
hydroflame
dd3ab9ca48 Merge pull request #2207 from mikomyazaki/scp-mem-docs
Fixes scp and mem helptext
2021-12-28 10:30:03 -05:00
hydroflame
c7657e5ec8 Merge pull request #2208 from Hedrauta/fix#2206
fix typo for #2206
2021-12-28 10:29:41 -05:00
hydroflame
0842aba6cf Merge pull request #2212 from alkemann/patch-1
Fixed typo
2021-12-28 10:29:01 -05:00
Alexander Morland
8b33f72703 Fixed typo 2021-12-28 11:01:22 +01:00
Tony Roberts
e9fd5f46eb Add buy all option to buy terminal command 2021-12-28 03:15:29 -05:00
Hedrauta
8aae2c9b7f fix typo for #2206 2021-12-28 03:54:04 +01:00
Andrew Cooper
33e4e31099 Fixes scp and mem helptext. 2021-12-28 00:54:35 +00:00
ErzengelLichtes
b13f146bc3 Changed writing specific text to be more generic 2021-12-27 11:36:14 -08:00
BrokenName
90ca9407d5 Update NetscriptFunctions.ts
Undid removal of writePort data validation
2021-12-27 10:38:00 -08:00
BrokenName
7c846abb65 DRY: Consolidated the code for retrieving a port so it will give consistent errors. 2021-12-27 10:06:38 -08:00
Ash Clark
58dd450aca Fix two typos in help command text 2021-12-27 11:47:02 -05:00
Jared Jolton
e3a9f9edab Fix "Terminal capacity" option description typo 2021-12-26 20:21:35 -07:00
theit8514
5607561c50 Add minimize button to log windows 2021-12-26 18:52:14 -05:00
theit8514
169d3e6c77 Add title attribute to log title bar 2021-12-26 17:47:32 -05:00
ReeseJones
1087db9f33 changed setting to selling in getSaleGain 2021-12-26 14:35:46 -08:00
Robert Klebes
6a9f6c05ec Update parseAliasDeclaration to match single quote
- Matches foo="bar" and foo='bar'
- Does not match foo="bar' or foo='bar"
2021-12-26 14:14:37 -05:00
Frank-py
a4eddb4691 Fixed typo in CONTRIBUTING.md file.
Changed naviguate to navigate.
2021-12-25 23:18:49 +01:00
Frank-py
73adc71965 Updated Terminal.tsx to add keypress event.
Added keypress event to delete the word after input by pressing "alt" + "d".
2021-12-25 23:11:21 +01:00
MageKing17
eb137455f5 Allow shortcuts to work while doing unfocused work.
A lot of people thought keyboard shortcuts weren't working because the code to make them stop working was only checking if the player was working without checking if the player was also focused. If doing unfocused work, there's no reason not to allow keyboard shortcuts to keep working.
2021-12-24 21:22:46 -08:00
MageKing17
a16cb745c5 Get rid of console spam in NetscriptFunctions.ts
This was filling up the console and making it hard to debug anything other than `exec` calls.
2021-12-24 19:34:34 -08:00
Anton Mironov
3dd818cb7b Updating doc for CorporationInfo.state
Now includes a list of possible values.
2021-12-24 17:35:23 +01:00
Anton Mironov
23683d3482 Fixes CorporationInfo.state
Before:
CorporationInfo.state was returning "[Object object]".

After:
CorporationInfo.state returns an actual state like START, PURCHASE, PRODUCTION, SALE, EXPORT
2021-12-24 17:32:51 +01:00
Locria Cyber
3b8bdb7449 Add peer dependencies for material-ui-color 2021-12-24 22:32:03 +08:00
Xynrati
072653674e Removing old comment about removed parameter
Because "no it don't"
2021-12-24 06:11:45 -08:00
maxtimum
07b00bc377 add -g, --grep flags to ps command, documentation 2021-12-23 22:31:07 -08:00
maxtimum
f28ddd3b3f update docs for -g flag 2021-12-23 21:39:34 -08:00
theit8514
fd93c6d338 Fix linting errors 2021-12-23 23:26:05 -05:00
theit8514
8f77f720e6 Cache the blobs generated by scripts 2021-12-23 23:06:01 -05:00
hydroflame
d99b03d12e Merge pull request #2164 from Hedrauta/fix#2155
fix docu for #2155
2021-12-23 21:47:19 -05:00
theit8514
2d949c076b Fix mv overwriting script files 2021-12-23 21:31:59 -05:00
maxtimum
13e68ba48e update documentation for ps 2021-12-23 17:43:52 -08:00
maxtimum
deb6d6cc0a add option to pass grep pattern to ps 2021-12-23 17:39:45 -08:00
Hedrauta
3eedd9df88 empty host = current host 2021-12-24 00:23:38 +01:00
Olivier Gagnon
ed86577d6c imports are more flexible 2021-12-23 15:57:32 -05:00
Olivier Gagnon
16c51e8e8e Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-23 15:35:45 -05:00
Olivier Gagnon
87d6c18254 ext push now save folder correctly 2021-12-23 15:34:01 -05:00
Andrew Cooper
12ba68a375 XP gain summaries now only show non-zero xp gains. 2021-12-23 19:15:39 +00:00
Andrew Cooper
4861ac4153 Fixes penalty message for quitting work early. 2021-12-23 19:15:22 +00:00
hydroflame
b33af9df20 Merge pull request #2150 from Hedrauta/new-Editor-theme_dracula
New Editor Theme: Dracula ( from VSCode )
2021-12-23 13:36:16 -05:00
Olivier Gagnon
fcb876695d remove leading slash when saving via http 2021-12-23 12:23:50 -05:00
hydroflame
0bddb7d349 Merge pull request #2152 from MartinFournier/fix/kill-rendering-process
Crash render process when javascript won't execute
2021-12-23 12:04:35 -05:00
Martin Fournier
6458440193 Fix #2021: Handle sleeves xp in stats overview 2021-12-23 09:11:08 -05:00
Martin Fournier
ea03889082 Crash render process when javascript won't execute
Prevents the renderer process staying up when the user scripts are
waiting for an unresolved promise.
2021-12-23 07:48:01 -05:00
Hedrauta
693c6480a0 as close as possible
Sadly, i can't color specific variables, because of monaco itself.
Did my best for this. 😉
2021-12-23 07:27:58 +01:00
hydroflame
c056ef2854 Merge pull request #2145 from mikomyazaki/2137-run-cct
Helptext for run now mentions coding contracts
2021-12-22 23:20:27 -05:00
hydroflame
eee72aa8d2 Merge pull request #2148 from TheMas3212/dev
modify BasicHGWOptions definition to mark threads parameter as optional
2021-12-22 22:56:23 -05:00
TheMas3212
e0aaa383a4 modify BasicHGWOptions definition to mark threads parameter as optional
this is used by hack, grow and weaken all of which dont require it to be defined
2021-12-23 14:42:06 +11:00
Andrew Cooper
7805b72457 'help run' docs now mentions coding contracts. 2021-12-23 01:23:57 +00:00
Olivier Gagnon
88151efa61 ext use base64 2021-12-22 19:56:43 -05:00
hydroflame
795f8b4d2b Merge pull request #2140 from danielyxie/mychanges
mychanges
2021-12-22 19:19:39 -05:00
hydroflame
bfdfee2a68 Merge branch 'dev' into mychanges 2021-12-22 16:16:24 -05:00
Olivier Gagnon
d2d6c33fc8 mychanges 2021-12-22 16:15:56 -05:00
hydroflame
dce7217fc5 Merge pull request #2062 from MartinFournier/fix/dangling-process
Handle electron process uncaught exceptions
2021-12-22 15:30:33 -05:00
Martin Fournier
6363c704db Handle electron process uncaught exceptions
Handling the exceptions and closing the app seem to properly kill the
dangling processes that appear at launch in Windows 10. Without this, if
an exception is throw before the window is active (ie: no
steamapp_id.txt file), there will be remaining processes.

Added electron-log to additionally log to a text file.
2021-12-22 15:28:55 -05:00
hydroflame
9ea66e8743 Merge pull request #2110 from MartinFournier/feature/themes
Add community themes from discord
2021-12-22 15:22:08 -05:00
hydroflame
7c599f2005 Merge pull request #2123 from MartinFournier/feature/reload-unresponsive
Add dialog when app is unresponsive to reload
2021-12-22 15:21:58 -05:00
hydroflame
fba2265cce Merge pull request #2118 from Icehawk78/feat/add-ns2-examples-docs
Add ns2 examples to the netscript docs
2021-12-22 15:21:06 -05:00
Martin Fournier
9ce8bdd29b Add dialog when app is unresponsive to reload
Checks the electron event 'unresponsive' and triggers a reload / cancel
dialog. Allows all scripts to be killed, checked by default.
Also adds a warning to the terminal when noScript has been executed.
2021-12-22 15:14:03 -05:00
Nicholas Galauxy
35cfa9492e Fix unintended spacing change 2021-12-22 13:38:32 -06:00
Nicholas Galauxy
ed4d4d091c Update docs to include NS2 examples 2021-12-22 13:36:44 -06:00
hydroflame
a97d2a93cb Merge pull request #2112 from theit8514/cp-2099
Fix cp from another folder to current folder
2021-12-22 14:30:29 -05:00
hydroflame
dbf8c788e0 Merge pull request #2111 from mikomyazaki/2027-documentation-updates
Documentation updates
2021-12-22 14:30:14 -05:00
hydroflame
76d67fdba5 Merge pull request #2113 from Xynrati/patch-2
Add ns2 example for scp
2021-12-22 14:30:05 -05:00
Martin Fournier
f2141dd83d Add community themes from discord 2021-12-22 13:54:04 -05:00
Xynrati
21ac94dbb3 Add ns2 example for scp 2021-12-22 09:38:21 -08:00
theit8514
06ec11a107 Fix cp from another folder to current folder
src is already passed through getFilepath. Doing it again roots the file in the current directory.
2021-12-22 12:34:08 -05:00
Andrew Cooper
c2e5c9f371 Documentation updates to getgrowtime, gethacktime, getweakentime, hack, hackanalyze and weaken. 2021-12-22 17:25:09 +00:00
hydroflame
7260d5fe35 Merge pull request #2100 from mikomyazaki/empty-editor-to-terminal
Closing the final script in your editor will take you to the terminal
2021-12-22 12:17:32 -05:00
hydroflame
366bffad85 Merge pull request #2098 from FOLLGAD/patch-2
Fix incorrect help entry for "weaken" command
2021-12-22 12:17:11 -05:00
hydroflame
1c7b0ab9a3 Merge pull request #2101 from Hedrauta/fix_commiitCrime_docu_description
Fix for ns.commitCrime description in the Documentation
2021-12-22 12:16:08 -05:00
hydroflame
ce0fb7a383 Merge pull request #2102 from mikomyazaki/2023-hack-analyze-threads-no-money
hackAnalyzeThreads will no longer return NaN under some circumstances
2021-12-22 12:14:57 -05:00
hydroflame
91ac40efd0 Merge pull request #2106 from MartinFournier/fix/ci
Split GitHub workflow into multiple jobs to get clearer results
2021-12-22 12:14:46 -05:00
hydroflame
e83c38b5fb Merge pull request #2103 from mikomyazaki/dev-options-add-minimise-server-money
Adds dev options to set server(s) cash to zero
2021-12-22 12:14:31 -05:00
hydroflame
50a85b61e2 Merge pull request #2109 from hexnaught/remove-timestamp-newline-buy-list-patch
fix(command:buy) don't wrap in typography
2021-12-22 12:05:39 -05:00
Dan
64dea97e3c fix(command:buy) don't wrap in typography
Warpping the output in typography inserts a newline before/after, this fine until timestamps are enabled and the components don't fall inline, and the typography newline is then visible.

Resolves danielyxie/bitburner#2108
2021-12-22 13:27:06 +00:00
Martin Fournier
d6c1f3bfca Split CI into multiple jobs to get clearer results 2021-12-22 04:45:16 -05:00
Martin Fournier
6b59a58ea3 Fix linter errors 2021-12-22 04:44:07 -05:00
Andrew Cooper
17b11f107f hackAnalyzeThreads will return zero instead of NaN when checking the effect of zero threads on a server with zero cash. 2021-12-22 01:12:45 +00:00
Andrew Cooper
7baacf4e1b Adds dev options to set server cash to zero. 2021-12-22 01:12:08 +00:00
Hedrauta
7f3f5c7648 commitCrime will return milliseconds 😉 2021-12-22 02:00:22 +01:00
Andrew Cooper
f2bdf00aba Closing the final script in your editor will take you to the terminal. 2021-12-22 00:26:01 +00:00
Emil Ahlbäck
e7e1e82394 Update HelpText.ts 2021-12-21 22:16:12 +01:00
Olivier Gagnon
ea0be338e1 dont make new copies when injecting via localhost 2021-12-21 15:40:23 -05:00
Olivier Gagnon
b2b682fa04 fix editor not loading files 2021-12-21 13:44:18 -05:00
Olivier Gagnon
41593e0dce fix editor not loading 2021-12-21 12:02:06 -05:00
hydroflame
79eb2f7e0b Merge pull request #2092 from theit8514/script-focus-v2
Add focus parameter to workForCompany/workForFaction
2021-12-21 11:02:26 -05:00
hydroflame
5021013cb7 Merge pull request #2078 from billyvg/feat/open-multiple-files-from-cli
feat: open multiple files from cli
2021-12-21 11:02:11 -05:00
hydroflame
c1c7131545 Merge branch 'dev' into feat/open-multiple-files-from-cli 2021-12-21 11:02:06 -05:00
hydroflame
81e3f2afd1 Merge pull request #1986 from billyvg/feat/add-vim-command
feat: add `vim` terminal command
2021-12-21 11:00:33 -05:00
hydroflame
f01b12a56a Merge pull request #2095 from MartinFournier/fix/bladeburner
Bladeburner console fixes & command checks
2021-12-21 10:59:47 -05:00
hydroflame
26106fa71d Merge pull request #2077 from MartinFournier/feature/get-theme
Add ns.ui.getTheme() api function
2021-12-21 10:57:58 -05:00
hydroflame
4be5e45740 Merge pull request #2073 from billyvg/fix/window-resizing
fix: Update editor height when resizing window
2021-12-21 10:56:51 -05:00
hydroflame
94d695bb12 Merge pull request #2082 from MartinFournier/fix/purchase-server-test
Fix tests by passing args to dynamic function test
2021-12-21 10:50:05 -05:00
hydroflame
1830287a6e Merge pull request #2079 from sschmidTU/dev
Fix typo (order -> orders)
2021-12-21 10:49:33 -05:00
hydroflame
7a9e8936ee Merge pull request #2083 from 65-7a/txt-file-editor-patch
Script editor fixes for .txt files
2021-12-21 10:49:08 -05:00
hydroflame
4183ed6f2b Merge pull request #2087 from 2PacIsAlive/dev
Fix typo on Augmentations page
2021-12-21 10:45:55 -05:00
hydroflame
ede6be3d0d Merge pull request #2085 from hexnaught/get-player-ramcost-doc-patch
docs(ns.getPlayer): update doc to have ram cost
2021-12-21 10:45:34 -05:00
Martin Fournier
2d269c7a4e Fix #2018: Blade console check blackops order
Prevents you from running blackops if you have not completed the
preceeding one.
2021-12-21 10:13:12 -05:00
theit8514
d873f7279b Add focus parameter to workForCompany/workForFaction
Defaults to true to keep previous behavior.
2021-12-21 08:13:18 -05:00
Martin Fournier
dbe36fd6b7 Fix #1916: Check blade console blackops rank
This prevents the player from starting a blackops without having the
rank requirements
2021-12-21 07:48:09 -05:00
Martin Fournier
f2ccc63b2d Fix #1915: Check blade console skill max level
Prevents you from leveling up a skill past its max level.
2021-12-21 07:48:09 -05:00
Martin Fournier
1427993a25 Fix #1901: Fix blade console command history
Up or down would not properly update the visible input value
2021-12-21 07:48:09 -05:00
Martin Fournier
0b71a83cfe Fix blade console input visibility on scroll
Before this, when scrolling up the input would be hidden.
2021-12-21 07:38:39 -05:00
Jared Jolton
bd375851a4 Fix typo on Augmentations page 2021-12-20 22:28:55 -07:00
Dan
8ccb128e6f docs(ns.getPlayer): update doc to have ram cost
Resolves danielyxie/bitburner#2084
2021-12-21 01:44:32 +00:00
65-7a
a6aebd4a29 Change model to plaintext for txt files 2021-12-21 10:35:03 +11:00
65-7a
56e540802b Disable RAM calculation for txt files 2021-12-21 10:21:22 +11:00
Martin Fournier
99f1e67224 Fix tests by passing args to dynamic function test
Function purchaseServer would throw with null arguments
2021-12-20 17:37:56 -05:00
Billy Vong
bb2f8e883c feat: Support opening multiple files from command line 2021-12-20 16:55:17 -05:00
sschmidTU
9a1437559a fix typo (order -> orders) 2021-12-20 22:39:33 +01:00
Billy Vong
d30edc7f59 feat: Add vim terminal command 2021-12-20 16:20:50 -05:00
Olivier Gagnon
009bae5870 catch scripts taht end too early 2021-12-20 16:06:19 -05:00
Olivier Gagnon
b57ac45698 doc 2021-12-20 15:59:46 -05:00
Olivier Gagnon
41a7109baa fix 2021-12-20 15:48:26 -05:00
Martin Fournier
65d0877edc Add ns.ui.getTheme() api function 2021-12-20 14:37:10 -05:00
Olivier Gagnon
ddd0eaaf5c weaken message 2021-12-20 14:13:56 -05:00
Billy Vong
63891351be remove TODO 2021-12-20 14:05:59 -05:00
Billy Vong
60749eefa7 remove console + format 2021-12-20 14:05:22 -05:00
Billy Vong
ee177393fa fix: Update editor height when resizing window 2021-12-20 14:04:42 -05:00
Olivier Gagnon
4ec021c8f0 cores explanation 2021-12-20 14:03:25 -05:00
Olivier Gagnon
e9886cc6bc fix uncaught promise 2021-12-20 13:57:07 -05:00
Olivier Gagnon
5dc9ac040a toast time config 2021-12-20 13:29:04 -05:00
hydroflame
25f78f2b30 Merge pull request #1984 from billyvg/feat/add-vim-mode
feat: Add vim mode to script editor
2021-12-20 12:03:05 -05:00
hydroflame
df265df9ce Merge pull request #2070 from hexnaught/show-owned-in-buy-list-patch
feat(command:buy): show owned items in buy list
2021-12-20 12:02:07 -05:00
Dan
388a3f56c3 feat(command:buy): show owned items in buy list
Just a little output change when you `buy -l`, to show you which items
you already own.
I couldn't access the theme when importing it here for use, it kept
crashing the app so the [OWNED} shows up always as green.. Which isn't
the end of the world considering the money always shows up in Yellow.
I think this area of code/output could do with a little bit of love at
some point.

Resolves danielyxie/bitburner#2069
2021-12-20 16:51:08 +00:00
Billy Vong
3fd904ff87 format 2021-12-20 10:48:32 -05:00
Billy Vong
6641ca9c73 fix ts 2021-12-20 10:45:44 -05:00
Billy Vong
517066a710 fix missed conflicts 2021-12-20 10:44:17 -05:00
Billy Vong
d372166c8b Merge branch 'dev' into feat/add-vim-mode 2021-12-20 10:36:58 -05:00
hydroflame
00b3cb61f4 Merge pull request #2065 from JJTech0130/patch-1
Disable Jekyll in GitHub Pages builds
2021-12-20 10:20:18 -05:00
hydroflame
8be201cd93 Merge pull request #2064 from MartinFournier/feature/focus-editor-on-open
Give focus to editor when opening or changing tabs
2021-12-20 10:19:14 -05:00
hydroflame
ab0ed5d6a4 Merge pull request #2061 from 65-7a/allow-cat-on-scripts-patch
Allow cat to work on scripts
2021-12-20 10:18:17 -05:00
hydroflame
87bf23b6f4 Merge pull request #2063 from MartinFournier/fix/lint
Linting ScriptEditor
2021-12-20 10:00:12 -05:00
JJTech0130
afdac4e9cc Disable Jekyll in GitHub Pages builds 2021-12-20 07:26:20 -05:00
Martin Fournier
e60996b86c Focus editor when opening or changing tabs 2021-12-20 07:15:53 -05:00
Martin Fournier
08a4a1649f Linting ScriptEditor 2021-12-20 07:01:34 -05:00
65-7a
3df0fd3945 Add script files to tab completion for cat 2021-12-20 21:11:58 +11:00
65-7a
14532cd0a8 Allow cat to work on scripts 2021-12-20 21:11:28 +11:00
Olivier Gagnon
f72d4b89d4 text editor improvements 2021-12-20 03:02:23 -05:00
hydroflame
53ce11c33a Merge pull request #2044 from Rez855/feature/multi-tab-script-editor
Script Editor Refactor
2021-12-20 02:45:57 -05:00
BuildTools
302af48be4 Fixed merge conflict 2021-12-20 01:44:51 -06:00
BuildTools
6d90025370 Adapted PR #2055 to the refacted script editor code 2021-12-20 01:40:01 -06:00
BuildTools
e5c4c8f64b Rebased
Added hostname to tab name
Removed -tas arg from the rm command
2021-12-20 01:40:01 -06:00
BuildTools
9c19ddf6a7 fixed git issue 2021-12-20 01:40:01 -06:00
BuildTools
cbfdfa5753 Removed testing log statements 2021-12-20 01:40:01 -06:00
BuildTools
3120d97cfa Update 2021-12-20 01:40:01 -06:00
BuildTools
6dc7dc42c5 resolved merge issue 2021-12-20 01:39:20 -06:00
hydroflame
3255768259 Merge pull request #1993 from Nick-Colclasure/file-read-patch
Fix problems finding root files in cat and ns.read
2021-12-20 01:56:20 -05:00
hydroflame
7215e73f41 Merge pull request #2055 from hexnaught/s-key-editor-save-patch
Change editor save keybind to be CTRL/CMD + S
2021-12-20 01:50:05 -05:00
hydroflame
e4345ebf68 Merge pull request #2057 from hexnaught/remove-partial-exe-on-buy-patch
Remove any partially built/created .EXE files on buy from darknet
2021-12-20 01:08:07 -05:00
hydroflame
2267845e2d Merge pull request #2049 from Kejikus/dev
Issue #2048 fix
2021-12-20 01:07:12 -05:00
Dan
b95261d905 fix(darkweb:buy) remove partial exe on buy
Remove any matching partial .exe item when buying it from the dark web.

Resolves danielyxie/bitburner#2024
2021-12-20 05:55:35 +00:00
Dan
6ec7fcb9fa refactor(keybinds): change editor save keybind S
We need to stop the event from bubbling up to the browser and opening a
'save html' window to keep support in the browser, other than that,
straight forward change to swap keybinding to 'S' for saving in the
editor.

Resolves danielyxie/bitburner#2053
2021-12-20 04:34:27 +00:00
hydroflame
82f6bbee13 Merge pull request #2046 from MartinFournier/fix/tests
Fix jest unit tests & add a github action workflow to build, test & lint
2021-12-19 22:35:25 -05:00
hydroflame
565e7677f8 Merge pull request #2045 from 2PacIsAlive/dev
Fix typo for Neuregen Augmentation
2021-12-19 22:33:31 -05:00
hydroflame
d1abe27484 Merge pull request #2047 from TheCoderJT/nuke-github-clarity
Fix Docs: made it more clear what nuke exe does
2021-12-19 22:32:41 -05:00
hydroflame
7710ae5564 Merge pull request #2050 from MageKing17/patch-1
Update NetscriptFunctions.ts
2021-12-19 22:32:02 -05:00
MageKing17
e521415273 Update NetscriptFunctions.ts
Just a simple change to make `alert` and `toast` reuse `argsToString` instead of `toNative` and `JSON.stringify` directly.

Fixes #2015.
2021-12-19 16:58:49 -08:00
Nicholas Colclasure
61dde4cfac Fix issue introduced handling files in subdirectories ._. 2021-12-19 13:03:50 -08:00
Kejikus
fcbf8a3824 Fixed bug with limited height of terminal screen
Needs testing.
2021-12-20 00:03:13 +03:00
Jordan Turner
f678574a6c made it more clear what nuke exe does 2021-12-19 13:47:34 -07:00
Martin Fournier
8b355c365e Add github workflow to run tests, linter & build 2021-12-19 15:43:13 -05:00
Martin Fournier
2bbb767575 Fix remaining unit test issues 2021-12-19 15:42:40 -05:00
Jared Jolton
06acccdfe1 Fix typo for Neuregen Augmentation 2021-12-19 13:42:09 -07:00
Martin Fournier
3b99da8474 Lint current problems & fix ignore paths 2021-12-19 13:17:44 -05:00
Martin Fournier
92e8b42d18 Fix renamed functions from 1.0 release in tests 2021-12-19 12:37:42 -05:00
Martin Fournier
d1696148c4 Fix tests syntax for jest
Most tests could not run with jest because of syntax difference between
the old test runner.
2021-12-19 12:37:42 -05:00
hydroflame
890b1df593 Merge pull request #2041 from hexnaught/job-shortcut-key-patch
Only run job shortcut if the player has a job
2021-12-19 10:28:42 -05:00
hydroflame
3ed5aa8045 Merge pull request #2038 from MartinFournier/fix/skill-progress
Fix skills tooltip edge cases
2021-12-19 10:22:43 -05:00
Dan
2f9eb324b4 fix(shortcut): job shortcut only run when have job
The shortcut was always allowed to run, meaning when the player doesn't
have a job, they were sent to the job screen with no job and lost the
view context/sidebar.

- Add utility method to check if the player 'hasJob', being at least 1
job.
- Check if player has job when the key combination is pressed

Resolves danielyxie/bitburner#2013
2021-12-19 15:20:02 +00:00
hydroflame
8c2b969026 Merge pull request #2036 from millennIumAMbiguity/patch-2
Improve the readability of text in the theme editor.
2021-12-19 10:13:57 -05:00
hydroflame
29f1bed823 Merge pull request #2037 from millennIumAMbiguity/patch-3
Fixed grammar issues in NS.purchaseServer()
2021-12-19 10:13:44 -05:00
Martin Fournier
05ed3f5461 Fix skills tooltip edge cases 2021-12-19 05:51:35 -05:00
millennIumAMbiguity
69fda94808 Fixed grammar issues in NS.purchaseServer()
Removed the article: the it will -> it will
Changed the quantifier: the amount of servers -> the number of servers
2021-12-19 11:30:44 +01:00
millennIumAMbiguity
a9cf635a84 Improve the readability of text in the theme editor.
Copy the string above if you want to backup or share your theme with others. -> Backup your theme or share it with others by copying the string above.
Use the buttons below to replace the current theme with a pre-built template -> Replace the current theme with a pre-built template using the buttons below.
2021-12-19 11:14:16 +01:00
Olivier Gagnon
efc3992c78 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-19 00:44:03 -05:00
Olivier Gagnon
76890ad1b9 update doc 2021-12-19 00:43:58 -05:00
hydroflame
3a21beb708 Merge pull request #2003 from MartinFournier/feature/predetermined-themes
Add easily switchable predefined themes
2021-12-19 00:40:59 -05:00
hydroflame
a76f67ade5 Merge pull request #2010 from hexnaught/server-purchase-naming-patch
Fix issue of space in server name and server counting when made with same name
2021-12-19 00:35:24 -05:00
hydroflame
24f0c9e65d Merge pull request #2007 from hexnaught/alias-hyphen-allowed-patch
Allow hyphens in command aliases
2021-12-19 00:28:11 -05:00
hydroflame
e6b84a73b2 Merge pull request #2031 from MageKing17/patch-1
Update ls.tsx
2021-12-19 00:24:58 -05:00
hydroflame
b6df183953 Merge pull request #2008 from hexnaught/lowercase-exe-call-patch
Allow `.exe` (programs) to be ran in a case-insensitive `run`
2021-12-19 00:23:52 -05:00
hydroflame
f5f206561c Merge pull request #2009 from hexnaught/script-exists-command-errors-patch
Better feedback when looking for a running script.
2021-12-19 00:23:30 -05:00
hydroflame
1ea8c62d4f Create check.ts 2021-12-19 00:23:10 -05:00
hydroflame
bc7f94ddda Update check.ts 2021-12-19 00:23:01 -05:00
MageKing17
1dcc17c4fb Update ls.tsx
`args[numArgs - 1]` is the last argument in the list, so correct usage was being flagged as incorrect, and incorrect usage wasn't working anyway because the filter was `"undefined"`.

Additionally, the function seemed confused as to whether or not `ls` counted as an argument (AFAICT, it isn't).

Fixes #1994.
2021-12-18 21:22:34 -08:00
Dan
6d79561859 fix(servers): fix issue of space in server name
Replace the space in a server name with a hyphen (-), also noticed some
interesting behaviour with the 'count up naming', so tweaked that.

Resolves danielyxie/bitburner#1999
2021-12-19 04:03:14 +00:00
Dan
b8b3897e64 fix(commands): tweak wording for consistency 2021-12-19 03:23:26 +00:00
Dan
b2add6c26b fix(commands): error feedback, wording consistency
Found most (hopefully all) places where the error message wording
incorrectly was shown to the tune of 'no script exists', where it should
have been showing to the effect of 'script is not running'.
Also cleaned up some of the consistency in the wording and added a
'helper' export for knowing valid script extensions used in validation
of 'isScriptFilename', so we can have consistent error messaging.

Resolves danielyxie/bitburner#1966
2021-12-19 03:10:43 +00:00
Dan
24c7fb2b92 fix(cli:run) case insensitive calls to program run
Allow the user to run programs (.exe) in a case insensitive manor

Resolves danielyxie/bitburner#1958
2021-12-19 02:41:21 +00:00
Dan
1f6954b393 fix(command:alias) allow hyphen in aliases
- Allow hyphens in aliases
- Remove redundant underscore, covered by '\w'

Resolves danielyxie/bitburner#2000
2021-12-19 02:09:47 +00:00
Olivier Gagnon
790ffeb8a1 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-18 18:15:19 -05:00
Olivier Gagnon
555216a39b Add confirmation to installing 2021-12-18 18:13:49 -05:00
hydroflame
aad4024e0f Merge branch 'master' into dev 2021-12-18 16:29:22 -05:00
Martin Fournier
db64d9869c Add easily switchable predefined themes
Includes the default theme and a Monokai-ish variant
2021-12-18 16:28:15 -05:00
Olivier Gagnon
02605090df v1.2.0 2021-12-18 16:28:09 -05:00
hydroflame
853125009b Merge pull request #1977 from Rez855/feature/multi-tab-script-editor
Added the ability to open multiple script files at a time
2021-12-18 14:53:35 -05:00
hydroflame
b739d60490 Merge pull request #1979 from MartinFournier/feature/skill-progress-bars
Fix #1889: Add skill progress to overview
2021-12-18 14:44:18 -05:00
hydroflame
d5201885aa Merge pull request #1997 from pobiega/fix/nformat-return-type
ScriptEditor NetScriptDefinitions: nFormat should return string
2021-12-18 14:40:20 -05:00
hydroflame
0ff110492e Merge pull request #1982 from wynro/add-ALL-to-enableLog
Add support for ALL argument in enableLog function
2021-12-18 14:39:44 -05:00
Olivier Gagnon
4eb1914c79 re-add n00dles in beginer guide 2021-12-18 14:37:52 -05:00
Olivier Gagnon
47f20c666e Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-18 14:36:30 -05:00
hydroflame
da58c1df9f Merge pull request #1959 from cblte/patch-1
Update gettingstartedguideforbeginnerprogrammers.rst
2021-12-18 14:36:25 -05:00
hydroflame
c723c7ecd2 Merge pull request #1957 from billyvg/feat/add-ctrl-u-clear-line
feat: Add `ctrl+u/k/w` hotkeys
2021-12-18 14:35:12 -05:00
Olivier Gagnon
d45d6c8f3a Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-18 14:29:04 -05:00
Olivier Gagnon
cbb3563556 @millennIumAMbiguity doc typo 2021-12-18 14:28:57 -05:00
hydroflame
eec9fbf997 Merge pull request #1989 from Xynrati/patch-1
Incorrect threadcount for n00dles
2021-12-18 10:56:41 -05:00
hydroflame
a9b0dd0d3f Merge pull request #1992 from 2PacIsAlive/dev
Fix typo in AutolinkProgram description
2021-12-18 10:56:33 -05:00
hydroflame
1dafa03a71 Merge pull request #1995 from Adraxas/dev
Fix NS.exec signature
2021-12-18 10:56:01 -05:00
hydroflame
7c1fa4e228 Merge pull request #1998 from MartinFournier/feature/suppress-save-toast
Add an option to suppress the 'Saved Game' toast
2021-12-18 10:55:07 -05:00
Olivier Gagnon
21191e0b8d re-add noscripts 2021-12-18 10:44:22 -05:00
Olivier Gagnon
1368e468bb Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-18 10:31:59 -05:00
BuildTools
59498f780a Small css tweaks 2021-12-18 07:11:59 -06:00
Martin Fournier
733f04c343 Add an option to suppress the 'Saved Game' toast 2021-12-18 08:01:15 -05:00
Robin Rexstedt
87d8f67df1 make nFormat return a string 2021-12-18 13:12:23 +01:00
BuildTools
2265f797c4 Added the ability to open multiple script files at a time
Fixed a bug where ram would stay the same when switching between scripts

Fixed bug where updating ram could cause the GUI to crash

The editor will now go to the last edited line when switching tabs.

Tidied up the script editor UI
2021-12-18 04:10:25 -06:00
Jared Jolton
5e5e2c60aa Fix typo in AutolinkProgram description 2021-12-17 21:58:05 -07:00
Nicholas Colclasure
8ba5199e54 Fix problems finding root files in cat and ns.read
Cat ends up translating the path it receives from relative to absolute twice, which I fix by changing the filename to an absolute path before it's passed to getTextFile with a leading "/" so that it doesn't interpret the filename as being relative.

Read I fixed by causing getTextFile to remove the leading "/" from files that are in the root directory, since that is required to translate their name into the native "filesystem"s format.
2021-12-17 20:40:46 -08:00
Adraxas
069d76df25 Fix NS.exec signature 2021-12-17 18:40:00 -08:00
Xynrati
160682f25a Incorrect threadcount for n00dles 2021-12-17 18:12:46 -08:00
Olivier Gagnon
eb002d655a Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-17 16:34:14 -05:00
Olivier Gagnon
5bb304caff rm console log 2021-12-17 16:33:55 -05:00
hydroflame
504a8a4be5 Merge pull request #1971 from MartinFournier/feature/hashes-upgrades
Fix #1863: Add getHashUpgrades hacknet function
2021-12-17 15:50:46 -05:00
hydroflame
ecc650576e Merge pull request #1967 from 2PacIsAlive/patch-1
Fix typo in sleeves.rst
2021-12-17 12:57:57 -05:00
Billy Vong
b3f9380ebd prettier 2021-12-17 12:56:48 -05:00
hydroflame
2b5cc03e79 Merge pull request #1968 from MageKing17/patch-1
Quickly fix silly typo mentioned on Discord.
2021-12-17 12:55:58 -05:00
hydroflame
b122cebc98 Merge pull request #1972 from MartinFournier/feature/electron-background-color
Fix #1902: Set default electron color to black
2021-12-17 12:55:32 -05:00
hydroflame
5b79712817 Merge pull request #1985 from billyvg/fix/prevent-ctrl-alt-j-navigation
Prevent `ctrl+alt+j` from navigating to Jobs
2021-12-17 12:55:08 -05:00
Billy Vong
6fb5565b08 remove unused code 2021-12-17 12:48:50 -05:00
hydroflame
3e4e26ac8c Merge pull request #1981 from MartinFournier/fix/theme-popup-deferred
Fix #1974: Change default input to deferred
2021-12-17 12:46:33 -05:00
hydroflame
b7011407fd Merge pull request #1980 from MartinFournier/feature/editorconfig
Set default editorconfig to indent_size=2
2021-12-17 12:46:08 -05:00
Martin Fournier
84c77c1d2c Fix #1889: Add skill progress to overview
Adds a progress bar for each stat to show how close to level up you are.
2021-12-17 12:44:18 -05:00
Billy Vong
f4ea1ae970 Merge branch 'dev' into fix/prevent-ctrl-alt-j-navigation 2021-12-17 12:39:57 -05:00
Billy Vong
cdd85c09e1 Merge branch 'dev' into feat/add-vim-mode 2021-12-17 12:38:16 -05:00
Billy Vong
659211e1ff Prevent ctrl+alt+j from navigating to Jobs
This is a browser hot key to open the Chrome Developer Tools.
2021-12-17 12:35:47 -05:00
Billy Vong
fb5d374279 feat: Add vim mode to script editor
This adds an option to turn on vim mode using the `monaco-vim` library.
2021-12-17 12:34:00 -05:00
hydroflame
c6843b231a Merge pull request #1962 from MartinFournier/feature/exit-process
Attempt to fix processes that stay up after closing app
2021-12-17 12:13:50 -05:00
hydroflame
196086cc13 Merge branch 'dev' into feature/exit-process 2021-12-17 11:49:58 -05:00
Olivier Gagnon
36fd3c5d68 try kill again 2021-12-17 11:38:00 -05:00
Guillermo Robles
b14432329a Add support for ALL argument in enableLog function
- Fixes: #1928
2021-12-17 17:33:33 +01:00
Martin Fournier
da0cc6d8f1 Fix #1974: Change default input to deferred
The value does not change automatically now, there's a "Set" button in
the popup to trigger the onColorChange event.
2021-12-17 11:00:00 -05:00
Martin Fournier
c59806c87d Set default editorconfig to indent_size=2
Prettier already formats the code like that, so it causes a mismatch for
devs using editorconfig as well.
2021-12-17 09:54:32 -05:00
Martin Fournier
6d94ee0c2c Fix #1902: Set default electron color to black
If loading of the index.html is slow, there should be no white
background anymore.
2021-12-17 05:52:31 -05:00
Martin Fournier
217b94d0a0 Fix #1863: Add getHashUpgrades hacknet function
Adds a new functions ofr hacknet servers that returns the list of
available hash upgrades.
2021-12-17 05:35:17 -05:00
MageKing17
e8b4d15078 Update TutorialRoot.tsx
Correct "NS1 vs NS1" typo.
2021-12-17 00:35:23 -08:00
Jared Jolton
c4bd6d8e11 Fix typo in sleeves.rst 2021-12-17 00:09:52 -07:00
Olivier Gagnon
6c5842d2e7 noscripts backup 2021-12-17 01:33:35 -05:00
Olivier Gagnon
b0929e3cff only exit?2 2021-12-16 23:29:52 -05:00
Olivier Gagnon
795df0ed69 only exit? 2021-12-16 23:13:05 -05:00
Olivier Gagnon
ae6f8c5ee7 make tutorial better 2021-12-16 20:54:50 -05:00
Martin Fournier
63f7775804 Remove process handler when doing a hard reload 2021-12-16 20:21:25 -05:00
Olivier Gagnon
81e291ef6a change color of terminal input 2021-12-16 20:20:07 -05:00
Olivier Gagnon
aafc311759 bug 2021-12-16 20:09:51 -05:00
Olivier Gagnon
99f3566e52 bugfix 2021-12-16 20:09:19 -05:00
Olivier Gagnon
9e86131625 bugfix 2021-12-16 20:07:34 -05:00
Martin Fournier
dc21a5b87b Attempt to fix processes that stay up after closing app 2021-12-16 18:26:20 -05:00
Billy Vong
9b64551197 Merge branch 'dev' into feat/add-ctrl-u-clear-line 2021-12-16 17:07:39 -05:00
Billy Vong
2e9a42d74c add comment 2021-12-16 17:03:49 -05:00
Billy Vong
2804b6ae56 remove console 2021-12-16 17:03:15 -05:00
Billy Vong
d4bf6100a3 feat: Add ctrl+u/k/w hotkeys
Adds the `ctrl+u/k/w` hotkeys to clear line before and after, as well as deleting word before cursor. I implemented deleting word after cursor, but I have not repod the functionality in bash, so I did not add the hotkey.
2021-12-16 16:59:24 -05:00
Olivier Gagnon
3436873373 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-16 15:49:02 -05:00
Olivier Gagnon
1cca819f87 disable browser throttling 2021-12-16 15:48:40 -05:00
Olivier Gagnon
3ca762d8cf disable browser throttling 2021-12-16 15:46:26 -05:00
hydroflame
55d386a504 Merge pull request #1952 from MartinFournier/feature/git-commit-version
Fix #1880: Show git commit of bundled app
2021-12-16 15:45:25 -05:00
hydroflame
88666ec3fa Merge pull request #1953 from danielyxie/dev
doc
2021-12-16 15:30:22 -05:00
Olivier Gagnon
33e918fc49 doc 2021-12-16 15:28:53 -05:00
Martin Fournier
e8e2760c73 Fix #1880: Show git commit of bundled app 2021-12-16 15:25:59 -05:00
Olivier Gagnon
e16fba2418 scan doc 2021-12-16 15:21:00 -05:00
hydroflame
c080f367b8 Merge pull request #1950 from danielyxie/dev
regen doc
2021-12-16 12:59:52 -05:00
Olivier Gagnon
1b680431b6 regen doc 2021-12-16 12:59:11 -05:00
hydroflame
c38992be8d Merge pull request #1949 from danielyxie/dev
build
2021-12-16 12:58:30 -05:00
Olivier Gagnon
361c3d3469 rebuild 2021-12-16 12:57:59 -05:00
Olivier Gagnon
5718800b91 doc update 2021-12-16 12:41:18 -05:00
Olivier Gagnon
6ef99e138c fix BN exploit 2021-12-16 12:40:24 -05:00
Olivier Gagnon
3c67da02f3 typo 2021-12-16 12:33:44 -05:00
hydroflame
9346979e2b Merge pull request #1943 from Hedrauta/master
fix for a typo at "Spiralize Matrix"s description
2021-12-16 12:30:41 -05:00
Olivier Gagnon
2e2bd7441a minor tweak 2021-12-16 12:30:23 -05:00
Olivier Gagnon
9292484ed0 minor tweak 2021-12-16 12:29:41 -05:00
hydroflame
abc61b820c Merge pull request #1938 from TheCoderJT/issue1906
#1906
2021-12-16 12:29:05 -05:00
Olivier Gagnon
a1af0318d8 minor error message tweak 2021-12-16 12:20:04 -05:00
hydroflame
b05645a61c Merge pull request #1936 from TheCoderJT/issue1920
Issue1920
2021-12-16 12:19:23 -05:00
hydroflame
43aba18b77 Merge pull request #1933 from Saynt-Garmo/dev
Issue 1911
2021-12-16 12:18:16 -05:00
Olivier Gagnon
52f2e52456 minor tweak to scp error message 2021-12-16 12:14:48 -05:00
hydroflame
0a63de4539 Merge pull request #1932 from theit8514/cp-1922
Update cp and mv terminal commands #1922
2021-12-16 12:14:15 -05:00
Olivier Gagnon
16431f1031 minor tweak to doc 2021-12-16 12:13:00 -05:00
hydroflame
2da9f87031 Merge pull request #1895 from TheCoderJT/editingGitDocs
Editing git docs
2021-12-16 12:11:05 -05:00
Olivier Gagnon
91c7811a36 format 2021-12-16 12:04:09 -05:00
Olivier Gagnon
d7f9cb8cec make setFocus a little more robust 2021-12-16 12:02:46 -05:00
hydroflame
f9499d3259 Merge pull request #1874 from theit8514/script-focus
Reimplement setFocus
2021-12-16 12:00:34 -05:00
Olivier Gagnon
a92d3238be small fix with electron build 2021-12-16 11:52:25 -05:00
Hedrauta
9e9a1ca882 Update codingcontracttypes.ts 2021-12-16 16:05:46 +01:00
Jordan Turner
89bc702ef2 . 2021-12-15 22:18:47 -07:00
Jordan Turner
53a8cbe9bd have to re commit for some reason sry same as before semi colons 2021-12-15 22:17:54 -07:00
Jordan Turner
e1e032b61f added semi colons they were missing at the end of some examples 2021-12-15 22:15:29 -07:00
Jordan Turner
db9b0a8ec8 added await before the ns2 method calls 2021-12-15 22:01:44 -07:00
Jordan Turner
3926913790 updated appearach of example sections based on alainbryden suggestion 2021-12-15 21:47:18 -07:00
theit8514
2e133bcf0a Fix return type of isFocused 2021-12-15 20:55:47 -05:00
Jordan Turner
889751490f finishWeaken now shows 3 decimal places for hackDifficulty and improved the print message 2021-12-15 18:53:39 -07:00
theit8514
d59601f848 Add return value and code style cleanup 2021-12-15 20:48:19 -05:00
theit8514
cd4c98d942 Only change to terminal when focused 2021-12-15 20:44:08 -05:00
theit8514
c50c92f9b5 Update SF requirement to match documentation 2021-12-15 20:33:48 -05:00
theit8514
2726420709 Add errors and only change page when focus changes 2021-12-15 20:33:48 -05:00
theit8514
07d449afc2 Ensure focus does not change between calls to work 2021-12-15 20:33:48 -05:00
theit8514
ad57f3dc73 Work functions do not take focus
setFocus readded and updated to send the user to the Work page if focusing.
2021-12-15 20:33:48 -05:00
Jordan Turner
ac79d0aea4 adjusted the wording and added dynamic player server location 2021-12-15 17:52:08 -07:00
Jordan Turner
4836617745 made the terminal error more clear based on issue 1920 2021-12-15 17:19:45 -07:00
tyasuh.taeragan@gmail.com
ce0de40e59 Issue 1934 2021-12-15 18:10:29 -05:00
tyasuh.taeragan@gmail.com
61e962ec12 Issue 1911 2021-12-15 17:59:03 -05:00
theit8514
8ef227595a Add support for relative paths in mv
Fixes mv command deleting file on overwrite
2021-12-15 17:46:36 -05:00
theit8514
4e022c68e9 Add support for relative paths in cp
Fix cp error messages
Add support for directory destinations (e.g. copy file.js directory)
2021-12-15 17:36:15 -05:00
Jordan Turner
632e1f70f3 added rs to backricks to color code syntax 2021-12-15 10:25:54 -07:00
Jordan Turner
687682fcbd added syntax useage to github ns page 2021-12-15 10:10:32 -07:00
Jordan Turner
ab24e4865e reverted back to orginal 2021-12-15 08:34:20 -07:00
Jordan Turner
a48d91b4cd added syntax useage to github ns main page 2021-12-15 08:24:05 -07:00
cblte
4991709772 Update gettingstartedguideforbeginnerprogrammers.rst
Updated the scan-analyze 2 output with current values. The server n00dles only has 4GB ram available, so I took him of the list of usable servers to run the script on.
2021-12-15 16:10:10 +01:00
Olivier Gagnon
e3a0caf50f fix killall steam not working 2021-12-14 22:34:09 -05:00
Olivier Gagnon
5b38ee3cfb fix undying script bug 2021-12-14 19:39:55 -05:00
hydroflame
a8f764bb8c Merge pull request #1879 from danielyxie/dev
bugfix
2021-12-14 15:56:31 -05:00
Olivier Gagnon
4d80813707 bugfix 2021-12-14 15:56:11 -05:00
Olivier Gagnon
de9fb24156 Fix scripts dying of weird causes. 2021-12-13 22:26:22 -05:00
Olivier Gagnon
c1e3a170ab Augmentations page shows stats reductions 2021-12-13 20:28:21 -05:00
Olivier Gagnon
e5b4dd8e90 Files should be saved on the server that opened them. 2021-12-13 20:08:58 -05:00
Olivier Gagnon
50bc9496ec fix gym not giving discoutns 2021-12-13 19:46:08 -05:00
Olivier Gagnon
1b42b51e5f few bugfix 2021-12-13 18:44:52 -05:00
Olivier Gagnon
7b8e486e3a fix typo in doc 2021-12-13 15:50:01 -05:00
hydroflame
dfdb940aa6 Merge pull request #1872 from danielyxie/dev
doc fix
2021-12-13 15:00:33 -05:00
Olivier Gagnon
aae03982ee Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-13 14:59:55 -05:00
Olivier Gagnon
72f7e9644c fix doc 2021-12-13 14:59:41 -05:00
hydroflame
e9623340af Merge pull request #1869 from theit8514/scp-async
Await scp multiple script copy
2021-12-13 12:08:25 -05:00
theit8514
3437a0a730 Await scp multiple script copy 2021-12-12 19:50:53 -05:00
Olivier Gagnon
7d6947ee01 fix unknown script die for known reason 2021-12-12 14:57:44 -05:00
Olivier Gagnon
e117548895 fix some stack traces not printing file name 2021-12-12 14:49:02 -05:00
Olivier Gagnon
4460bf1613 fix shortcuts 2021-12-12 14:02:45 -05:00
hydroflame
154f467935 Merge pull request #1866 from danielyxie/dev
getServer of hacknet doesn't return undefined
2021-12-12 13:48:39 -05:00
Olivier Gagnon
11ba8c91be getServer of hacknet doesn't return undefined 2021-12-12 13:47:05 -05:00
hydroflame
7e474da3fe Merge pull request #1865 from danielyxie/dev
many fixes
2021-12-12 13:30:41 -05:00
Olivier Gagnon
dea8abef1d better error message for bad args 2021-12-12 13:30:28 -05:00
Olivier Gagnon
cdeabfec0e Steam enable debug 2021-12-12 13:25:28 -05:00
Olivier Gagnon
eb77bf352c fullscreen for steam 2021-12-12 12:58:57 -05:00
Olivier Gagnon
c845fb4203 reload n kill on steam 2021-12-12 12:48:42 -05:00
Olivier Gagnon
5f696aba72 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2021-12-12 12:48:26 -05:00
Olivier Gagnon
69a9448e47 fix typos 2021-12-12 12:46:56 -05:00
hydroflame
5dfd5dc91c Merge pull request #1855 from TealKoi/patch-1
Update bitburner.ns.getweakentime.md
2021-12-12 12:35:09 -05:00
Eric Wright
f2708e6772 Update bitburner.ns.getweakentime.md
There is a reference to the grow function on line 25. Update to reference weaken.
2021-12-11 19:22:18 -06:00
hydroflame
ac3ed65e55 Merge pull request #1851 from DJMatch3000/patch-1
Player Stats ui bugfix
2021-12-10 16:10:19 -05:00
DJMatch3000
445fbd59c7 Player Stats ui bugfix
Fixed a mix-up with Bladeburner stats on the Player Stats page
2021-12-10 15:45:17 -05:00
hydroflame
12114f0146 Merge pull request #1850 from danielyxie/dev
boost noodle bar
2021-12-09 16:49:27 -05:00
Olivier Gagnon
172998bef5 boost noodle bar 2021-12-09 16:47:26 -05:00
hydroflame
246e088365 Merge pull request #1849 from danielyxie/dev
nerf manualHack int gain but differently
2021-12-09 16:32:20 -05:00
Olivier Gagnon
2eaa33c9f3 nerf manualHack int gain but differently 2021-12-09 16:30:03 -05:00
hydroflame
638e0e8a13 Merge pull request #1848 from danielyxie/dev
regen doc
2021-12-09 16:26:57 -05:00
Olivier Gagnon
769aad8ead nerf manualHack int gain 2021-12-09 16:26:49 -05:00
Olivier Gagnon
d5e47a7180 regen doc 2021-12-09 12:59:46 -05:00
hydroflame
d86986555c Merge pull request #1847 from danielyxie/dev
formulas for ascension
2021-12-09 12:53:04 -05:00
Olivier Gagnon
394a286646 formulas for ascension 2021-12-09 12:52:51 -05:00
hydroflame
1d046d7d87 Merge pull request #1846 from danielyxie/dev
tighten bn13
2021-12-09 10:45:53 -05:00
Olivier Gagnon
5e916ee3bd tighten bn13 2021-12-09 10:45:33 -05:00
hydroflame
b326bd26bc Merge pull request #1845 from danielyxie/dev
make BN13 harder
2021-12-09 10:16:09 -05:00
Olivier Gagnon
7e6a0bbf56 make BN13 harder 2021-12-09 10:15:50 -05:00
hydroflame
3cdb73be6c Merge pull request #1844 from danielyxie/dev
Added option to suppress TIX limit/stop orders
2021-12-08 20:21:59 -05:00
Olivier Gagnon
d195b00ab6 Added option to suppress TIX limit/stop orders 2021-12-08 20:21:44 -05:00
hydroflame
4c88ab7794 Merge pull request #1843 from danielyxie/dev
corp doc
2021-12-08 20:03:44 -05:00
Olivier Gagnon
c915cd06d8 corp doc 2021-12-08 20:03:22 -05:00
hydroflame
30af70c4ab Merge pull request #1842 from danielyxie/dev
Formulas doc
2021-12-08 19:19:42 -05:00
Olivier Gagnon
14317628e6 formulas doc 2021-12-08 19:19:07 -05:00
Olivier Gagnon
5a15df9ce7 rename the functions I created 2 minutes ago. 2021-12-08 19:03:33 -05:00
hydroflame
63c5387cfe Merge pull request #1841 from danielyxie/dev
rename functions I just created
2021-12-08 18:42:07 -05:00
Olivier Gagnon
6eba92b36c rename the functions I created 2 minutes ago. 2021-12-08 18:41:49 -05:00
Olivier Gagnon
d64ce5271e fix receiving multiple times the same invite 2021-12-08 18:29:56 -05:00
Olivier Gagnon
ed821617c0 save files are now chronologically named 2021-12-08 18:27:57 -05:00
Olivier Gagnon
35fa4a4117 fix sleeve function not returning cha 2021-12-08 18:27:14 -05:00
Olivier Gagnon
0306397f53 fix buying negative memory 2021-12-08 18:25:49 -05:00
hydroflame
6b0c4471a6 Merge pull request #1840 from danielyxie/dev
formulas for gang stuff
2021-12-08 18:19:58 -05:00
Olivier Gagnon
2af57cb01e formulas for gang stuff 2021-12-08 18:19:30 -05:00
hydroflame
beaa60c967 Merge pull request #1837 from danielyxie/dev
few bugfix
2021-12-08 17:39:17 -05:00
Olivier Gagnon
d01d75606a few bugfix 2021-12-08 17:39:01 -05:00
hydroflame
aa7cf7469e Merge pull request #1824 from danielyxie/dev
add bn14 location
2021-12-04 23:50:00 -05:00
Olivier Gagnon
133d80749d add bn14 location 2021-12-04 23:47:53 -05:00
hydroflame
fa1dd4d0cf Merge pull request #1823 from danielyxie/dev
rm tail bound
2021-12-04 18:58:42 -05:00
Olivier Gagnon
a845c5ac8f rm tail bound 2021-12-04 18:58:26 -05:00
hydroflame
181b7f39e5 Merge pull request #1822 from danielyxie/dev
corp api
2021-12-03 23:08:30 -05:00
Olivier Gagnon
25aa5d3afe corp api 2021-12-03 23:08:11 -05:00
Olivier Gagnon
737276e855 corp api 2021-12-03 23:06:04 -05:00
hydroflame
ed26228cdc Merge pull request #1820 from cvr-119/text
Typo correction
2021-12-03 16:59:32 -05:00
corver
2f55cd27c5 Fix some Bladeburner typos 2021-12-03 16:45:48 -05:00
corver
83090bfa8c Match descriptions of BN5 and SF5 2021-12-03 16:30:06 -05:00
hydroflame
a48cd2f1b4 Merge pull request #1819 from danielyxie/dev
wd diff increase
2021-12-03 16:28:00 -05:00
Olivier Gagnon
f487a0c0e9 loosed hacking nerf 2021-12-03 16:27:49 -05:00
Olivier Gagnon
5470f9fdc1 wd diff increase 2021-12-03 16:21:35 -05:00
hydroflame
403ab167b5 Merge pull request #1817 from danielyxie/dev
BN13: They're Lunatics
2021-12-03 16:14:51 -05:00
hydroflame
043aaeab8a Merge pull request #1814 from danielyxie/dev
many bugfix
2021-12-03 15:31:41 -05:00
hydroflame
cf11def6b9 Merge pull request #1813 from danielyxie/dev
many bugfix
2021-12-03 14:12:47 -05:00
hydroflame
ff4bcb26f4 Merge pull request #1810 from danielyxie/dev
fix log isue
2021-12-03 13:55:03 -05:00
hydroflame
1e9cf015e9 Merge pull request #1809 from danielyxie/dev
getOwnedSF is not sing anymore
2021-12-02 12:43:29 -05:00
hydroflame
326cd5afa0 Merge pull request #1804 from danielyxie/dev
community fixes
2021-11-30 11:15:09 -05:00
hydroflame
ff8cd8b3e2 Merge pull request #1798 from danielyxie/dev
Buncha fix
2021-11-27 11:45:06 -05:00
hydroflame
01a6dd7aab Merge pull request #1787 from danielyxie/dev
Scripting stuff
2021-11-25 11:47:56 -05:00
hydroflame
c2b58ffcce Merge pull request #1781 from danielyxie/dev
gang with 0 territory cannot fight
2021-11-24 17:58:37 -05:00
hydroflame
f42bc288a6 Merge pull request #1780 from danielyxie/dev
Prevent browser back
2021-11-24 16:15:55 -05:00
hydroflame
d6cbca94bd Merge pull request #1764 from danielyxie/dev
few bugfix
2021-11-22 11:36:34 -05:00
hydroflame
d169d2af4c Merge pull request #1759 from danielyxie/dev
fix tprintf printing filename
2021-11-20 15:01:33 -05:00
hydroflame
ac74d6a46b Merge pull request #1751 from danielyxie/dev
fix some coloring stuff
2021-11-19 23:55:21 -05:00
hydroflame
41592a199a Merge pull request #1750 from danielyxie/dev
fix tprintf catching errors
2021-11-19 22:58:56 -05:00
hydroflame
7764afaf31 Merge pull request #1748 from danielyxie/dev
v1.0.2
2021-11-19 15:50:51 -05:00
hydroflame
73bbf4d454 Merge pull request #1743 from danielyxie/dev
spawn defaults to 1 thread
2021-11-18 18:01:04 -05:00
hydroflame
ced4ac2502 Merge pull request #1742 from danielyxie/dev
Add button to donate blood.
2021-11-18 15:23:50 -05:00
hydroflame
6e7ca6a9b5 Merge pull request #1741 from danielyxie/dev
v1.0.1
2021-11-18 11:33:10 -05:00
hydroflame
3b13db1e33 Merge pull request #1736 from danielyxie/dev
few bugfix
2021-11-17 17:50:14 -05:00
hydroflame
cd8da81c97 Merge pull request #1735 from danielyxie/dev
tail box can rerun scripts
2021-11-17 17:33:58 -05:00
hydroflame
b222b1ecbf Merge pull request #1729 from danielyxie/dev
plenty of bf
2021-11-15 23:49:47 -05:00
hydroflame
b990e0e71c Merge pull request #1723 from danielyxie/dev
boost terminal grow
2021-11-14 08:36:46 -05:00
hydroflame
154936c1c5 Merge pull request #1720 from danielyxie/dev
revert omuretsu fix
2021-11-13 20:49:57 -05:00
hydroflame
5ef51d521b Merge pull request #1718 from danielyxie/dev
few bugfix
2021-11-13 19:51:14 -05:00
hydroflame
db6452ee3c Merge pull request #1715 from danielyxie/dev
fix doc
2021-11-13 09:35:33 -05:00
hydroflame
89dffa6dfc Merge pull request #1711 from danielyxie/dev
Make alter reality harder
2021-11-12 19:29:15 -05:00
hydroflame
ffb390fe7d Merge pull request #1710 from danielyxie/dev
fix bladeburner action cancel
2021-11-12 16:54:45 -05:00
hydroflame
83eb4afdf0 Merge pull request #1708 from danielyxie/dev
Improved 404
2021-11-12 16:26:08 -05:00
hydroflame
bc0ab1077c Merge pull request #1707 from danielyxie/dev
Added 404
2021-11-12 16:16:08 -05:00
hydroflame
018dc7c579 Merge pull request #1706 from danielyxie/dev
fix bn5 not giving formulas.exe
2021-11-12 15:48:47 -05:00
hydroflame
ef5fbb7e49 Merge pull request #1705 from danielyxie/dev
rename some stuff and close some exploits
2021-11-12 15:44:11 -05:00
hydroflame
ca50123d1a Merge pull request #1701 from danielyxie/dev
fix more bugs
2021-11-12 10:10:42 -05:00
hydroflame
6b7a468688 Merge pull request #1700 from danielyxie/dev
few more bugfixes
2021-11-11 23:28:28 -05:00
hydroflame
9f14c38396 Merge pull request #1698 from danielyxie/dev
fix corp not loading
2021-11-11 22:45:40 -05:00
hydroflame
724914b85c Merge pull request #1696 from danielyxie/dev
build
2021-11-11 21:35:44 -05:00
397 changed files with 469258 additions and 3576 deletions

View File

@@ -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

View File

@@ -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
View 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
View File

@@ -4,6 +4,7 @@ Changelog.txt
Netburner.txt
/doc/build
/node_modules
/electron/node_modules
/dist/*.map
/test/*.map
/test/*.bundle.*

1
.nojekyll Normal file
View File

@@ -0,0 +1 @@

View File

@@ -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
View 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.

View File

@@ -1,16 +1,19 @@
# Bitburner
[![Build Status](https://github.com/danielyxie/bitburner/actions/workflows/ci.yml/badge.svg?branch=dev)](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.

View File

@@ -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`

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

808
dist/bitburner.d.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View 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
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

160
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -12,3 +12,4 @@ must be unlocked.
Source-Files <advancedgameplay/sourcefiles>
Intelligence <advancedgameplay/intelligence>
Sleeves <advancedgameplay/sleeves>
Hacking algorithms <advancedgameplay/hackingalgorithms>

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View 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.

View File

@@ -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,

View File

@@ -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. |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

View 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.

View File

@@ -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
^^

View File

@@ -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.

View File

@@ -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.

View File

@@ -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`

View File

@@ -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::

View File

@@ -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

View File

@@ -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`

View File

@@ -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.

View File

@@ -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

View File

@@ -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}

View File

@@ -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

View File

@@ -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

View File

@@ -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

File diff suppressed because one or more lines are too long

35
electron/achievements.js Normal file
View 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
View 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
View 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
View 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
View 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,
}

View File

@@ -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
View 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
View 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"
}
}
}
}

View File

@@ -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
View 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,
}

View File

@@ -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

View File

@@ -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

View File

@@ -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 contracts data;
The specified contracts data, data type depends on contract type.;
## Remarks

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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. |

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [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

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [expenses](./bitburner.corporationinfo.expenses.md)
## CorporationInfo.expenses property
Expenses per second this cycle
<b>Signature:</b>
```typescript
expenses: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [funds](./bitburner.corporationinfo.funds.md)
## CorporationInfo.funds property
Funds available
<b>Signature:</b>
```typescript
funds: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [issuedShares](./bitburner.corporationinfo.issuedshares.md)
## CorporationInfo.issuedShares property
Amount of shares issued
<b>Signature:</b>
```typescript
issuedShares: number;
```

View File

@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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 |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [name](./bitburner.corporationinfo.name.md)
## CorporationInfo.name property
Name of the corporation
<b>Signature:</b>
```typescript
name: string;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [numShares](./bitburner.corporationinfo.numshares.md)
## CorporationInfo.numShares property
Amount of share owned
<b>Signature:</b>
```typescript
numShares: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [public](./bitburner.corporationinfo.public.md)
## CorporationInfo.public property
Is the company is public
<b>Signature:</b>
```typescript
public: boolean;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [revenue](./bitburner.corporationinfo.revenue.md)
## CorporationInfo.revenue property
Revenue per second this cycle
<b>Signature:</b>
```typescript
revenue: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [sharePrice](./bitburner.corporationinfo.shareprice.md)
## CorporationInfo.sharePrice property
Price of the shares
<b>Signature:</b>
```typescript
sharePrice: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md)
## CorporationInfo.shareSaleCooldown property
Cooldown until shares can be sold again
<b>Signature:</b>
```typescript
shareSaleCooldown: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [state](./bitburner.corporationinfo.state.md)
## CorporationInfo.state property
State of the corporation, like PRODUCTION or EXPORT
<b>Signature:</b>
```typescript
state: string;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [totalShares](./bitburner.corporationinfo.totalshares.md)
## CorporationInfo.totalShares property
Total number of shares issues by this corporation
<b>Signature:</b>
```typescript
totalShares: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [awareness](./bitburner.division.awareness.md)
## Division.awareness property
Awareness of the division
<b>Signature:</b>
```typescript
awareness: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [cities](./bitburner.division.cities.md)
## Division.cities property
Cities in which this division has expanded
<b>Signature:</b>
```typescript
cities: string[];
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md)
## Division.lastCycleExpenses property
Expenses last cycle
<b>Signature:</b>
```typescript
lastCycleExpenses: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md)
## Division.lastCycleRevenue property
Revenue last cycle
<b>Signature:</b>
```typescript
lastCycleRevenue: number;
```

View File

@@ -0,0 +1,31 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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 |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [name](./bitburner.division.name.md)
## Division.name property
Name of the division
<b>Signature:</b>
```typescript
name: string;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [popularity](./bitburner.division.popularity.md)
## Division.popularity property
Popularity of the division
<b>Signature:</b>
```typescript
popularity: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [prodMult](./bitburner.division.prodmult.md)
## Division.prodMult property
Production multiplier
<b>Signature:</b>
```typescript
prodMult: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [research](./bitburner.division.research.md)
## Division.research property
Amount of research in that division
<b>Signature:</b>
```typescript
research: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [thisCycleExpenses](./bitburner.division.thiscycleexpenses.md)
## Division.thisCycleExpenses property
Expenses this cycle
<b>Signature:</b>
```typescript
thisCycleExpenses: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [thisCycleRevenue](./bitburner.division.thiscyclerevenue.md)
## Division.thisCycleRevenue property
Revenue this cycle
<b>Signature:</b>
```typescript
thisCycleRevenue: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [type](./bitburner.division.type.md)
## Division.type property
Type of division, like Aggriculture
<b>Signature:</b>
```typescript
type: string;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Division](./bitburner.division.md) &gt; [upgrades](./bitburner.division.upgrades.md)
## Division.upgrades property
All research bought
<b>Signature:</b>
```typescript
upgrades: number[];
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [cha](./bitburner.employee.cha.md)
## Employee.cha property
<b>Signature:</b>
```typescript
cha: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [cre](./bitburner.employee.cre.md)
## Employee.cre property
<b>Signature:</b>
```typescript
cre: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [eff](./bitburner.employee.eff.md)
## Employee.eff property
<b>Signature:</b>
```typescript
eff: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [ene](./bitburner.employee.ene.md)
## Employee.ene property
Energy
<b>Signature:</b>
```typescript
ene: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [exp](./bitburner.employee.exp.md)
## Employee.exp property
<b>Signature:</b>
```typescript
exp: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [hap](./bitburner.employee.hap.md)
## Employee.hap property
Happiness
<b>Signature:</b>
```typescript
hap: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Employee](./bitburner.employee.md) &gt; [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