mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Merge branch 'dev' of https://github.com/rderfler/bitburner into dev
This commit is contained in:
commit
47ce4f4927
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.
|
||||
|
@ -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