mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
Merge branch 'dev' into improvement/purchase-augs-ui
This commit is contained in:
commit
09458b39e6
4
dist/main.bundle.js
vendored
4
dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main.bundle.js.map
vendored
2
dist/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
66
dist/vendor.bundle.js
vendored
66
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/vendor.bundle.js.map
vendored
2
dist/vendor.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@ -164,9 +164,9 @@ export function Roulette(props: IProps): React.ReactElement {
|
||||
let playerWin = strategy.match(n);
|
||||
// oh yeah, the house straight up cheats. Try finding the seed now!
|
||||
if (playerWin && Math.random() > 0.9) {
|
||||
playerWin = false;
|
||||
while (strategy.match(n)) {
|
||||
n = (n + 1) % 36;
|
||||
while (playerWin) {
|
||||
n = Math.floor(rng.random() * 37);
|
||||
playerWin = strategy.match(n);
|
||||
}
|
||||
}
|
||||
if (playerWin) {
|
||||
|
@ -202,7 +202,7 @@ function _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): Scri
|
||||
|
||||
// We automatically define a print function() in the NetscriptJS module so that
|
||||
// accidental calls to window.print() do not bring up the "print screen" dialog
|
||||
transformedCode += `\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript's print()?");}\n//# sourceURL=${script.server}/${script.filename}`;
|
||||
transformedCode += `\n//# sourceURL=${script.server}/${script.filename}`;
|
||||
|
||||
const blob = URL.createObjectURL(makeScriptBlob(transformedCode));
|
||||
// Push the blob URL onto the top of the stack.
|
||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -2198,7 +2198,7 @@ export interface Singularity {
|
||||
* RAM cost: 5 GB * 16/4/1
|
||||
*
|
||||
*
|
||||
* This function will automatically install your Augmentations, resetting the game as usual.
|
||||
* This function will automatically install your Augmentations, resetting the game as usual. If you do not own uninstalled Augmentations then the game will not reset.
|
||||
*
|
||||
* @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.
|
||||
*/
|
||||
|
@ -4,6 +4,7 @@ import ReactDOM from "react-dom";
|
||||
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
||||
import { LoadingScreen } from "./ui/LoadingScreen";
|
||||
import { initElectron } from "./Electron";
|
||||
import { AlertEvents } from "./ui/React/AlertManager";
|
||||
initElectron();
|
||||
globalThis["React"] = React;
|
||||
globalThis["ReactDOM"] = ReactDOM;
|
||||
@ -34,3 +35,9 @@ function rerender(): void {
|
||||
return "Your work will be lost.";
|
||||
};
|
||||
})();
|
||||
|
||||
(function () {
|
||||
window.print = () => {
|
||||
throw new Error("You accidentally called window.print instead of ns.print");
|
||||
};
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user