This commit is contained in:
Olivier Gagnon 2021-09-25 13:31:42 -04:00
parent f7aa393a8f
commit ef17f0d617
9 changed files with 38 additions and 24 deletions

@ -1,18 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8" />
<title>Bitburner</title>
<link rel="apple-touch-icon" sizes="180x180" href="dist/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="dist/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="dist/favicon-16x16.png"/>
<link rel="manifest" href="dist/site.webmanifest"/>
<link rel="mask-icon" href="dist/safari-pinned-tab.svg" color="#000000"/>
<meta name="apple-mobile-web-app-title" content="Bitburner"/>
<meta name="application-name" content="Bitburner"/>
<meta name="msapplication-TileColor" content="#000000"/>
<meta name="msapplication-config" content="dist/browserconfig.xml"/>
<meta name="theme-color" content="#ffffff"/>
<link rel="apple-touch-icon" sizes="180x180" href="dist/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="dist/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="dist/favicon-16x16.png" />
<link rel="manifest" href="dist/site.webmanifest" />
<link rel="mask-icon" href="dist/safari-pinned-tab.svg" color="#000000" />
<meta name="apple-mobile-web-app-title" content="Bitburner" />
<meta name="application-name" content="Bitburner" />
<meta name="msapplication-TileColor" content="#000000" />
<meta name="msapplication-config" content="dist/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
<!-- Google Analytics -->
<script>
@ -36,7 +36,10 @@
ga("send", "pageview");
</script>
<link rel="shortcut icon" href="favicon.ico"><link href="dist/vendor.css" rel="stylesheet"><link href="main.css" rel="stylesheet"></head>
<link rel="shortcut icon" href="favicon.ico" />
<link href="dist/vendor.css" rel="stylesheet" />
<link href="main.css" rel="stylesheet" />
</head>
<body>
<div id="entire-game-container">
<div id="mainmenu-container" style="display: flex; flex-direction: row"></div>
@ -47,8 +50,11 @@
</div>
</div>
<div id="modal-portal"></div>
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
<script type="text/javascript" src="dist/vendor.bundle.js"></script>
<script type="text/javascript" src="main.bundle.js"></script>
</body>
<script src="src/ThirdParty/raphael.min.js"></script>
</html>

@ -2,7 +2,7 @@
* Root React component for the Augmentations UI page that display all of your
* owned and purchased Augmentations and Source-Files.
*/
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import { InstalledAugmentations } from "./InstalledAugmentations";
import { PlayerMultipliers } from "./PlayerMultipliers";
@ -23,10 +23,17 @@ interface IProps {
export function AugmentationsRoot(props: IProps): React.ReactElement {
const setRerender = useState(false)[1];
function rerender(): void {
setRerender((o) => !o);
}
useEffect(() => {
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);
function doExport(): void {
props.exportGameFn();
setRerender((o) => !o);
rerender();
}
function exportBonusStr(): string {

@ -24,7 +24,7 @@ export function FactionsRoot(props: IProps): React.ReactElement {
setRerender((old) => !old);
}
useEffect(() => {
const id = setInterval(rerender, 1000);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);
function openFaction(faction: Faction): void {

@ -38,7 +38,7 @@ export function Info(props: IProps): React.ReactElement {
}
useEffect(() => {
const id = setInterval(rerender, 1000);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);

@ -42,7 +42,7 @@ export function HacknetRoot(props: IProps): React.ReactElement {
const [purchaseMultiplier, setPurchaseMultiplier] = useState<number | string>(PurchaseMultipliers.x1);
useEffect(() => {
const id = setInterval(rerender, 1000);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);

@ -14,7 +14,7 @@ export function ProgramsRoot(): React.ReactElement {
}
useEffect(() => {
const id = setInterval(rerender, 1000);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);
@ -33,7 +33,7 @@ export function ProgramsRoot(): React.ReactElement {
return (
<React.Fragment key={program.name}>
<Tooltip title={create.tooltip}>
<Tooltip title={create.tooltip} disableInteractive>
<Button
sx={{ my: 1 }}
onClick={(event) => {

@ -47,6 +47,7 @@
</div>
</div>
<div id="modal-portal"></div>
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
</body>

@ -22,7 +22,7 @@ export function ActiveScriptsRoot(props: IProps): React.ReactElement {
}
useEffect(() => {
const id = setInterval(rerender, 20);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);

@ -253,7 +253,7 @@ export function CharacterStats(): React.ReactElement {
}
useEffect(() => {
const id = setInterval(rerender, 20);
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);