David Walker 06553d9700 BUGFIX: Fix "Router called before initialization" race (#1474)
If the game takes long enough to load, certain counters can become
eligible to run as soon as Engine.start() runs. When this happens,
eventually Router.page() is called, which throws an Error since Router
isn't initialized yet. (Dropping a breakpoint before Engine.start() and
waiting at least 30 seconds is enough to reliably repro, but I have seen
this both live and in tests.)

This fixes it so that Router.page() is valid immediately, returning a
value of Page.LoadingScreen. It also removes the isInitialized field,
since this is now redundant. Trying to switch pages is still an error,
but that doesn't happen without user input, whereas checking the current
page is quite common.

This also consolidates a check for "should we show toasts" behind a
function in Router, making the logic central and equal for a few
usecases. This means (for instance) that the "autosave is disabled"
logic won't run during infiltration. (The toast should have already been
suppressed.)
2024-07-07 22:13:37 -07:00
2023-05-25 19:49:58 -04:00
2024-07-03 19:39:21 -04:00
2022-10-09 01:25:31 -04:00
2022-04-12 14:59:53 -04:00
2023-07-27 06:47:55 -05:00
2023-02-04 07:42:35 -05:00
2023-03-18 12:15:00 +02:00
2022-01-10 07:37:01 -05:00
2021-11-02 14:42:41 -04:00
2021-09-08 23:47:34 -04:00
2023-07-30 22:08:36 -04:00
2022-03-07 18:22:26 -05:00
2022-01-27 20:44:50 -05:00
2023-08-06 00:05:03 -04:00
2023-01-06 14:43:09 +02:00

Bitburner

Join Discord

Build Status

Bitburner is a programming-based incremental game that revolves around hacking and cyberpunk themes. The game can be played at https://bitburner-official.github.io/ (release build), https://bitburner-official.github.io/bitburner-src/ (development build), or installed through Steam. The location of the release build may change in the near future.

See the frequently asked questions for more information . To discuss the game or get help, join the official Discord server.

Documentation

The game's official documentation can be found in-game.

The in-game documentation is generated from the TypeScript definitions.

Anyone is welcome to contribute to the documentation by editing the source files and then making a pull request with your contributions. For further guidance, please refer to the "As A Documenter" section of CONTRIBUTING.

Contribution

There are many ways to contribute to the game. It can be as simple as fixing a typo, correcting a bug, or improving the UI. For guidance on doing so, please refer to the CONTRIBUTING document.

You will retain all ownership of the Copyright of any contributions you make, and will have the same rights to use or license your contributions. By submitting a pull request you agree to grant me perpetual, worldwide, non-exclusive, transferable, royalty-free, and irrevocable rights to use, publish, and distribute your contributions to the project. A formal Contributor's License Agreement will be drawn up in the future.

If you would like to make significant contributions to the project as a collaborator, please reach out in #suggestions or #development on Discord to help coordinate the effort.

Description
Bitburner source code.
Readme 401 MiB
Languages
TypeScript 97.5%
JavaScript 2.3%
HTML 0.1%