mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
Merge branch 'danielyxie:dev' into dev
This commit is contained in:
commit
f187343fa1
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);
|
let playerWin = strategy.match(n);
|
||||||
// oh yeah, the house straight up cheats. Try finding the seed now!
|
// oh yeah, the house straight up cheats. Try finding the seed now!
|
||||||
if (playerWin && Math.random() > 0.9) {
|
if (playerWin && Math.random() > 0.9) {
|
||||||
playerWin = false;
|
while (playerWin) {
|
||||||
while (strategy.match(n)) {
|
n = Math.floor(rng.random() * 37);
|
||||||
n = (n + 1) % 36;
|
playerWin = strategy.match(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (playerWin) {
|
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
|
// 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
|
// 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));
|
const blob = URL.createObjectURL(makeScriptBlob(transformedCode));
|
||||||
// Push the blob URL onto the top of the stack.
|
// Push the blob URL onto the top of the stack.
|
||||||
|
@ -4,6 +4,7 @@ import ReactDOM from "react-dom";
|
|||||||
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
||||||
import { LoadingScreen } from "./ui/LoadingScreen";
|
import { LoadingScreen } from "./ui/LoadingScreen";
|
||||||
import { initElectron } from "./Electron";
|
import { initElectron } from "./Electron";
|
||||||
|
import { AlertEvents } from "./ui/React/AlertManager";
|
||||||
initElectron();
|
initElectron();
|
||||||
globalThis["React"] = React;
|
globalThis["React"] = React;
|
||||||
globalThis["ReactDOM"] = ReactDOM;
|
globalThis["ReactDOM"] = ReactDOM;
|
||||||
@ -34,3 +35,9 @@ function rerender(): void {
|
|||||||
return "Your work will be lost.";
|
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