mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
Merge pull request #1250 from danielyxie/dev
rework options menu & fix terminal scrolling on added lines
This commit is contained in:
commit
55769b5005
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/engineStyle.bundle.js
vendored
2
dist/engineStyle.bundle.js
vendored
@ -1,2 +1,2 @@
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={2:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;u.push([1021,0]),o()}({1021:function(n,t,o){"use strict";o.r(t);o(1022),o(1024),o(1026),o(1028),o(1030),o(1032),o(1034),o(1036),o(1038),o(1040),o(1042),o(1044),o(1046),o(1048),o(1050),o(1052),o(1054),o(1056),o(1058),o(1060),o(1062),o(1064),o(1066),o(1068),o(1070),o(1072),o(1074),o(1076),o(1078),o(1080),o(1082)},1024:function(n,t,o){},1026:function(n,t,o){},1028:function(n,t,o){},1030:function(n,t,o){},1032:function(n,t,o){},1034:function(n,t,o){},1036:function(n,t,o){},1038:function(n,t,o){},1040:function(n,t,o){},1042:function(n,t,o){},1044:function(n,t,o){},1046:function(n,t,o){},1048:function(n,t,o){},1050:function(n,t,o){},1052:function(n,t,o){},1054:function(n,t,o){},1056:function(n,t,o){},1058:function(n,t,o){},1060:function(n,t,o){},1062:function(n,t,o){},1064:function(n,t,o){},1066:function(n,t,o){},1068:function(n,t,o){},1070:function(n,t,o){},1072:function(n,t,o){},1074:function(n,t,o){},1076:function(n,t,o){},1078:function(n,t,o){},1080:function(n,t,o){},1082:function(n,t,o){}});
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={2:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;u.push([1043,0]),o()}({1043:function(n,t,o){"use strict";o.r(t);o(1044),o(1046),o(1048),o(1050),o(1052),o(1054),o(1056),o(1058),o(1060),o(1062),o(1064),o(1066),o(1068),o(1070),o(1072),o(1074),o(1076),o(1078),o(1080),o(1082),o(1084),o(1086),o(1088),o(1090),o(1092),o(1094),o(1096),o(1098),o(1100),o(1102),o(1104)},1046:function(n,t,o){},1048:function(n,t,o){},1050:function(n,t,o){},1052:function(n,t,o){},1054:function(n,t,o){},1056:function(n,t,o){},1058:function(n,t,o){},1060:function(n,t,o){},1062:function(n,t,o){},1064:function(n,t,o){},1066:function(n,t,o){},1068:function(n,t,o){},1070:function(n,t,o){},1072:function(n,t,o){},1074:function(n,t,o){},1076:function(n,t,o){},1078:function(n,t,o){},1080:function(n,t,o){},1082:function(n,t,o){},1084:function(n,t,o){},1086:function(n,t,o){},1088:function(n,t,o){},1090:function(n,t,o){},1092:function(n,t,o){},1094:function(n,t,o){},1096:function(n,t,o){},1098:function(n,t,o){},1100:function(n,t,o){},1102:function(n,t,o){},1104:function(n,t,o){}});
|
||||
//# sourceMappingURL=engineStyle.bundle.js.map
|
34
dist/vendor.bundle.js
vendored
34
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -40,12 +40,7 @@ export function CodingContracts(): React.ReactElement {
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Select
|
||||
id="contract-types-dropdown"
|
||||
className="dropdown"
|
||||
onChange={setCodingcontractDropdown}
|
||||
value={codingcontract}
|
||||
>
|
||||
<Select onChange={setCodingcontractDropdown} value={codingcontract}>
|
||||
{Object.values(CodingContractTypes).map((cc) => (
|
||||
<MenuItem key={cc.name} value={cc.name}>
|
||||
{cc.name}
|
||||
|
@ -29,4 +29,5 @@ export interface IEngine {
|
||||
loadInfiltrationContent: (name: string, difficulty: number, maxLevel: number) => void;
|
||||
loadMissionContent: () => void;
|
||||
loadResleevingContent: () => void;
|
||||
loadGameOptionsContent: () => void;
|
||||
}
|
||||
|
@ -254,6 +254,10 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
setActiveTab("Milestones");
|
||||
props.engine.loadMilestonesContent();
|
||||
}
|
||||
function clickOptions(): void {
|
||||
setActiveTab("Options");
|
||||
props.engine.loadGameOptionsContent();
|
||||
}
|
||||
|
||||
function clickDev(): void {
|
||||
setActiveTab("Dev");
|
||||
@ -355,7 +359,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
>
|
||||
<ListItem button onClick={toggleDrawer}>
|
||||
<ListItemIcon>{!open ? <ChevronRightIcon /> : <ChevronLeftIcon />}</ListItemIcon>
|
||||
<ListItemText primary={<Typography color="primary">Bitburner {CONSTANTS.Version}</Typography>} />
|
||||
<ListItemText primary={<Typography color="primary">Bitburner v{CONSTANTS.Version}</Typography>} />
|
||||
</ListItem>
|
||||
<Divider />
|
||||
<List>
|
||||
@ -711,20 +715,21 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
</Typography>
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
{/*<ListItem
|
||||
<ListItem
|
||||
button
|
||||
key={"Options"}
|
||||
className={clsx({
|
||||
[classes.active]: activeTab === "Options",
|
||||
})}
|
||||
onClick={clickOptions}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<SettingsIcon color={activeTab !== "Options" ? "secondary" : "primary"} />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
<Typography color={activeTab !== "Options" ? "secondary" : "primary"}>options</Typography>
|
||||
<Typography color={activeTab !== "Options" ? "secondary" : "primary"}>Options</Typography>
|
||||
</ListItemText>
|
||||
</ListItem>*/}
|
||||
</ListItem>
|
||||
{process.env.NODE_ENV === "development" && (
|
||||
<ListItem
|
||||
button
|
||||
|
@ -26,6 +26,7 @@ import { SidebarRoot } from "./Sidebar/ui/SidebarRoot";
|
||||
import { CorporationRoot } from "./Corporation/ui/CorporationRoot";
|
||||
import { ResleeveRoot } from "./PersonObjects/Resleeving/ui/ResleeveRoot";
|
||||
import { GameOptionsRoot } from "./ui/React/GameOptionsRoot";
|
||||
import { Theme } from "./ui/React/Theme";
|
||||
import { SleeveRoot } from "./PersonObjects/Sleeve/ui/SleeveRoot";
|
||||
import { displayInfiltrationContent } from "./Infiltration/Helper";
|
||||
import {
|
||||
@ -360,7 +361,28 @@ const Engine = {
|
||||
routing.navigateTo(Page.GameOptions);
|
||||
Engine.Display.content.style.display = "block";
|
||||
MainMenuLinks.City.classList.add("active");
|
||||
ReactDOM.render(<GameOptionsRoot />, Engine.Display.content);
|
||||
ReactDOM.render(
|
||||
<Theme>
|
||||
<GameOptionsRoot
|
||||
player={Player}
|
||||
save={() => saveObject.saveGame(Engine.indexedDb)}
|
||||
delete={() => saveObject.deleteGame(Engine.indexedDb)}
|
||||
export={() => saveObject.exportGame()}
|
||||
import={() => saveObject.importGame()}
|
||||
forceKill={() => {
|
||||
for (const hostname of Object.keys(AllServers)) {
|
||||
AllServers[hostname].runningScripts = [];
|
||||
}
|
||||
dialogBoxCreate("Forcefully deleted all running scripts. Please save and refresh page.");
|
||||
}}
|
||||
softReset={() => {
|
||||
dialogBoxCreate("Soft Reset!");
|
||||
prestigeAugmentation();
|
||||
}}
|
||||
/>
|
||||
</Theme>,
|
||||
Engine.Display.content,
|
||||
);
|
||||
},
|
||||
|
||||
// Helper function that hides all content
|
||||
|
@ -1,337 +1,521 @@
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
interface IProps {}
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
|
||||
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import Slider from "@material-ui/core/Slider";
|
||||
import Grid from "@material-ui/core/Grid";
|
||||
import FormControlLabel from "@material-ui/core/FormControlLabel";
|
||||
import Switch from "@material-ui/core/Switch";
|
||||
import Select from "@material-ui/core/Select";
|
||||
import MenuItem from "@material-ui/core/MenuItem";
|
||||
import Button from "@material-ui/core/Button";
|
||||
import Box from "@material-ui/core/Box";
|
||||
import List from "@material-ui/core/List";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import Link from "@material-ui/core/Link";
|
||||
import Tooltip from "@material-ui/core/Tooltip";
|
||||
import { Modal } from "../../ui/React/Modal";
|
||||
import { FileDiagnosticPopup } from "../../Diagnostic/FileDiagnosticPopup";
|
||||
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
root: {
|
||||
width: theme.spacing(50),
|
||||
padding: theme.spacing(2),
|
||||
userSelect: "none",
|
||||
},
|
||||
pad: {
|
||||
padding: theme.spacing(2),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
interface IProps {
|
||||
player: IPlayer;
|
||||
save: () => void;
|
||||
delete: () => void;
|
||||
export: () => void;
|
||||
import: () => void;
|
||||
forceKill: () => void;
|
||||
softReset: () => void;
|
||||
}
|
||||
|
||||
export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
return (
|
||||
<>
|
||||
<h1>Game Options</h1>
|
||||
</>
|
||||
const classes = useStyles();
|
||||
|
||||
const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);
|
||||
const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);
|
||||
const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);
|
||||
const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);
|
||||
|
||||
const [suppressMessages, setSuppressMessages] = useState(Settings.SuppressMessages);
|
||||
const [suppressFactionInvites, setSuppressFactionInvites] = useState(Settings.SuppressFactionInvites);
|
||||
const [suppressTravelConfirmations, setSuppressTravelConfirmations] = useState(Settings.SuppressTravelConfirmation);
|
||||
const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = useState(
|
||||
Settings.SuppressBuyAugmentationConfirmation,
|
||||
);
|
||||
const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = useState(
|
||||
Settings.SuppressHospitalizationPopup,
|
||||
);
|
||||
/*
|
||||
|
||||
<h1>Game Options</h1>
|
||||
const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);
|
||||
|
||||
const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);
|
||||
const [disableASCIIArt, setDisableASCIIArt] = useState(Settings.DisableASCIIArt);
|
||||
const [disableTextEffects, setDisableTextEffects] = useState(Settings.DisableTextEffects);
|
||||
const [locale, setLocale] = useState(Settings.Locale);
|
||||
const [diagnosticOpen, setDiagnosticOpen] = useState(false);
|
||||
|
||||
function handleExecTimeChange(event: any, newValue: number | number[]): void {
|
||||
setExecTime(newValue as number);
|
||||
Settings.CodeInstructionRunTime = newValue as number;
|
||||
}
|
||||
|
||||
function handleLogSizeChange(event: any, newValue: number | number[]): void {
|
||||
setLogSize(newValue as number);
|
||||
Settings.MaxLogCapacity = newValue as number;
|
||||
}
|
||||
|
||||
function handlePortSizeChange(event: any, newValue: number | number[]): void {
|
||||
setPortSize(newValue as number);
|
||||
Settings.MaxPortCapacity = newValue as number;
|
||||
}
|
||||
|
||||
function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void {
|
||||
setAutosaveInterval(newValue as number);
|
||||
Settings.AutosaveInterval = newValue as number;
|
||||
}
|
||||
|
||||
function handleSuppressMessagesChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressMessages(event.target.checked);
|
||||
Settings.SuppressMessages = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressFactionInvitesChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressFactionInvites(event.target.checked);
|
||||
Settings.SuppressFactionInvites = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressTravelConfirmationsChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressTravelConfirmations(event.target.checked);
|
||||
Settings.SuppressTravelConfirmation = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressBuyAugmentationConfirmationChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressBuyAugmentationConfirmation(event.target.checked);
|
||||
Settings.SuppressBuyAugmentationConfirmation = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressHospitalizationPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressHospitalizationPopup(event.target.checked);
|
||||
Settings.SuppressHospitalizationPopup = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressBladeburnerPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressBladeburnerPopup(event.target.checked);
|
||||
Settings.SuppressBladeburnerPopup = event.target.checked;
|
||||
}
|
||||
|
||||
function handleDisableHotkeysChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setDisableHotkeys(event.target.checked);
|
||||
Settings.DisableHotkeys = event.target.checked;
|
||||
}
|
||||
|
||||
function handleDisableASCIIArtChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setDisableASCIIArt(event.target.checked);
|
||||
Settings.DisableASCIIArt = event.target.checked;
|
||||
}
|
||||
|
||||
function handleDisableTextEffectsChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setDisableTextEffects(event.target.checked);
|
||||
Settings.DisableTextEffects = event.target.checked;
|
||||
}
|
||||
function handleLocaleChange(event: React.ChangeEvent<{ value: unknown }>): void {
|
||||
setLocale(event.target.value as string);
|
||||
Settings.Locale = event.target.value as string;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classes.root} style={{ width: "90%" }}>
|
||||
<Typography variant="h4" gutterBottom>
|
||||
Options
|
||||
</Typography>
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<List>
|
||||
<ListItem>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too
|
||||
low can result in poor performance if you have many scripts running.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Netscript exec time (ms)</Typography>
|
||||
</Tooltip>
|
||||
<Slider
|
||||
value={execTime}
|
||||
onChange={handleExecTimeChange}
|
||||
step={1}
|
||||
min={10}
|
||||
max={100}
|
||||
valueLabelDisplay="auto"
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
The maximum number of lines a script's logs can hold. Setting this too high can cause the game to
|
||||
use a lot of memory if you have many scripts running.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Netscript log size</Typography>
|
||||
</Tooltip>
|
||||
<Slider
|
||||
value={logSize}
|
||||
onChange={handleLogSizeChange}
|
||||
step={1}
|
||||
min={20}
|
||||
max={100}
|
||||
valueLabelDisplay="auto"
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
The maximum number of entries that can be written to a port using Netscript's write() function.
|
||||
Setting this too high can cause the game to use a lot of memory.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Netscript port size</Typography>
|
||||
</Tooltip>
|
||||
<Slider
|
||||
value={portSize}
|
||||
onChange={handlePortSizeChange}
|
||||
step={1}
|
||||
min={20}
|
||||
max={100}
|
||||
valueLabelDisplay="auto"
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>The time (in seconds) between each autosave. Set to 0 to disable autosave.</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Autosave interval (s)</Typography>
|
||||
</Tooltip>
|
||||
<Slider
|
||||
value={autosaveInterval}
|
||||
onChange={handleAutosaveIntervalChange}
|
||||
step={30}
|
||||
min={0}
|
||||
max={600}
|
||||
valueLabelDisplay="auto"
|
||||
marks
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={suppressMessages} onChange={handleSuppressMessagesChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, then any messages you receive will not appear as popups on the screen. They will
|
||||
still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal
|
||||
command.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress messages</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressFactionInvites}
|
||||
onChange={handleSuppressFactionInvitesChange}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, then any faction invites you receive will not appear as popups on the screen.
|
||||
Your outstanding faction invites can be viewed in the 'Factions' page.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress faction invites</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressTravelConfirmations}
|
||||
onChange={handleSuppressTravelConfirmationsChange}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, the confirmation message before traveling will not show up. You will
|
||||
automatically be deducted the travel cost as soon as you click.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress travel confirmations</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressBuyAugmentationConfirmation}
|
||||
onChange={handleSuppressBuyAugmentationConfirmationChange}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, the confirmation message before buying augmentation will not show up.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress buy augmentation confirmation</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressHospitalizationPopup}
|
||||
onChange={handleSuppressHospitalizationPopupChange}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, a popup message will no longer be shown when you are hospitalized after taking
|
||||
too much damage.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress hospitalization popup</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
{!!props.player.bladeburner && (
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressBladeburnerPopup}
|
||||
onChange={handleSuppressBladeburnerPopupChange}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, then having your Bladeburner actions interrupted by being busy with something
|
||||
else will not display a popup message.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Supress bladeburner popup</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
)}
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={disableHotkeys} onChange={handleDisableHotkeysChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes
|
||||
Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and
|
||||
Close (Ctrl + b)" hotkey in the Text Editor.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Disable hotkeys</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={disableASCIIArt} onChange={handleDisableASCIIArtChange} />}
|
||||
label={
|
||||
<Tooltip title={<Typography>If this is set all ASCII art will be disabled.</Typography>}>
|
||||
<Typography>Disable ascii art</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch color="primary" checked={disableTextEffects} onChange={handleDisableTextEffectsChange} />
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If this is set, text effects will not be displayed. This can help if text is difficult to read
|
||||
in certain areas.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Disable text effects</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Tooltip title={<Typography>Sets the locale for displaying numbers.</Typography>}>
|
||||
<Typography>Locale </Typography>
|
||||
</Tooltip>
|
||||
<Select value={locale} onChange={handleLocaleChange}>
|
||||
<MenuItem value="en">en</MenuItem>
|
||||
<MenuItem value="bg">bg</MenuItem>
|
||||
<MenuItem value="cs">cs</MenuItem>
|
||||
<MenuItem value="da-dk">da-dk</MenuItem>
|
||||
<MenuItem value="de">de</MenuItem>
|
||||
<MenuItem value="en-au">en-au</MenuItem>
|
||||
<MenuItem value="en-gb">en-gb</MenuItem>
|
||||
<MenuItem value="es">es</MenuItem>
|
||||
<MenuItem value="fr">fr</MenuItem>
|
||||
<MenuItem value="hu">hu</MenuItem>
|
||||
<MenuItem value="it">it</MenuItem>
|
||||
<MenuItem value="lv">lv</MenuItem>
|
||||
<MenuItem value="no">no</MenuItem>
|
||||
<MenuItem value="pl">pl</MenuItem>
|
||||
<MenuItem value="ru">ru</MenuItem>
|
||||
</Select>
|
||||
</ListItem>
|
||||
</List>
|
||||
<br />
|
||||
<div id="game-options-left-panel">
|
||||
<!-- Netscript execution time -->
|
||||
<fieldset>
|
||||
<label for="settingsNSExecTimeRangeVal" class="tooltip"
|
||||
>Netscript exec time:
|
||||
<span class="tooltiptext">
|
||||
The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low
|
||||
can result in poor performance if you have many scripts running. The default value is 25ms.
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="optionRange"
|
||||
type="range"
|
||||
max="100"
|
||||
min="10"
|
||||
step="1"
|
||||
name="settingsNSExecTimeRangeVal"
|
||||
id="settingsNSExecTimeRangeVal"
|
||||
value="25"
|
||||
/>
|
||||
<em id="settingsNSExecTimeRangeValLabel" style="font-style: normal"></em>
|
||||
</fieldset>
|
||||
|
||||
<!-- Log capacity -->
|
||||
<fieldset>
|
||||
<label for="settingsNSLogRangeVal" class="tooltip"
|
||||
>Netscript log size:
|
||||
<span class="tooltiptext">
|
||||
The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use
|
||||
a lot of memory if you have many scripts running. The default value is 50.
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="optionRange"
|
||||
type="range"
|
||||
max="100"
|
||||
min="20"
|
||||
step="1"
|
||||
name="settingsNSLogRangeVal"
|
||||
id="settingsNSLogRangeVal"
|
||||
value="50"
|
||||
/>
|
||||
<em id="settingsNSLogRangeValLabel" style="font-style: normal"></em>
|
||||
</fieldset>
|
||||
|
||||
<!-- Port capacity -->
|
||||
<fieldset>
|
||||
<label for="settingsNSPortRangeVal" class="tooltip"
|
||||
>Netscript port size:
|
||||
<span class="tooltiptext">
|
||||
The maximum number of entries that can be written to a port using Netscript's write() function.
|
||||
Setting this too high can cause the game to use a lot of memory. The default value is 50.
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="optionRange"
|
||||
type="range"
|
||||
max="100"
|
||||
min="20"
|
||||
step="1"
|
||||
name="settingsNSPortRangeVal"
|
||||
id="settingsNSPortRangeVal"
|
||||
value="50"
|
||||
/>
|
||||
<em id="settingsNSPortRangeValLabel" style="font-style: normal"></em>
|
||||
</fieldset>
|
||||
|
||||
<!-- Autosave Interval -->
|
||||
<fieldset>
|
||||
<label for="settingsAutosaveIntervalVal" class="tooltip"
|
||||
>Autosave Interval:
|
||||
<span class="tooltiptext">
|
||||
The time (in seconds) between each autosave. Set to 0 to disable autosave.
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="optionRange"
|
||||
type="range"
|
||||
max="600"
|
||||
min="0"
|
||||
step="1"
|
||||
name="settingsAutosaveIntervalVal"
|
||||
id="settingsAutosaveIntervalVal"
|
||||
value="60"
|
||||
/>
|
||||
<em id="settingsAutosaveIntervalValLabel" style="font-style: normal"></em>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress messages -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressMessages" class="tooltip"
|
||||
>Suppress Messages:
|
||||
<span class="tooltiptext">
|
||||
If this is set, then any messages you receive will not appear as popups on the screen. They will still
|
||||
get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressMessages"
|
||||
id="settingsSuppressMessages"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress faction invites -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressFactionInvites" class="tooltip"
|
||||
>Suppress Faction Invites:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, then any faction invites you receive will not appear as popups on the screen. Your
|
||||
outstanding faction invites can be viewed in the 'Factions' page.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressFactionInvites"
|
||||
id="settingsSuppressFactionInvites"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress travel confirmation -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressTravelConfirmation" class="tooltip"
|
||||
>Suppress Travel Confirmation:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, the confirmation message before traveling will not show up. You will automatically be
|
||||
deducted the travel cost as soon as you click.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressTravelConfirmation"
|
||||
id="settingsSuppressTravelConfirmation"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress buy aug confirmation -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressBuyAugmentationConfirmation" class="tooltip"
|
||||
>Suppress buy augmentation confirmation:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, the confirmation message before buying augmentation will not show up.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressBuyAugmentationConfirmation"
|
||||
id="settingsSuppressBuyAugmentationConfirmation"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Hospitalization Popup -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressHospitalizationPopup" class="tooltip"
|
||||
>Suppress Hospitalization popup:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, a popup message will no longer be shown when you are hospitalized after taking too
|
||||
much damage.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressHospitalizationPopup"
|
||||
id="settingsSuppressHospitalizationPopup"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress Bladeburner popups -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressBladeburnerPopup" class="tooltip"
|
||||
>Suppress Bladeburner Popup:
|
||||
<span class="tooltiptext">
|
||||
If this is set, then having your Bladeburner actions interrupted by being busy with something else
|
||||
will not display a popup message.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsSuppressBladeburnerPopup"
|
||||
id="settingsSuppressBladeburnerPopup"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Disable Terminal and Navigation Shortcuts -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableHotkeys" class="tooltip"
|
||||
>Disable Hotkeys:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes
|
||||
Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close
|
||||
(Ctrl + b)" hotkey in the Text Editor.
|
||||
</span>
|
||||
</label>
|
||||
<input class="optionCheckbox" type="checkbox" name="settingsDisableHotkeys" id="settingsDisableHotkeys" />
|
||||
</fieldset>
|
||||
|
||||
<!-- View city as list of buttons instead of ASCII art. -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableASCIIArt" class="tooltip"
|
||||
>Disable ASCII art:
|
||||
<span class="tooltiptexthigh"> If this is set all ASCII art will be disabled. </span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsDisableASCIIArt"
|
||||
id="settingsDisableASCIIArt"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Disable text effects such as corruption. -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableTextEffects" class="tooltip"
|
||||
>Disable Text Effects:
|
||||
<span class="tooltiptexthigh">
|
||||
If this is set, text effects will not be displayed. This can help if text is difficult to read in
|
||||
certain areas.
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
class="optionCheckbox"
|
||||
type="checkbox"
|
||||
name="settingsDisableTextEffects"
|
||||
id="settingsDisableTextEffects"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Locale for displaying numbers -->
|
||||
<fieldset>
|
||||
<label for="settingsLocale" class="tooltip"
|
||||
>Locale:
|
||||
<span class="tooltiptexthigh"> Sets the locale for displaying numbers. Defaults to 'en' </span>
|
||||
</label>
|
||||
<select name="settingsLocale" id="settingsLocale" class="dropdown">
|
||||
<option value="en">en</option>
|
||||
<option value="bg">bg</option>
|
||||
<option value="cs">cs</option>
|
||||
<option value="da-dk">da-dk</option>
|
||||
<option value="de">de</option>
|
||||
<option value="en-au">en-au</option>
|
||||
<option value="en-gb">en-gb</option>
|
||||
<option value="es">es</option>
|
||||
<option value="fr">fr</option>
|
||||
<option value="hu">hu</option>
|
||||
<option value="it">it</option>
|
||||
<option value="lv">lv</option>
|
||||
<option value="no">no</option>
|
||||
<option value="pl">pl</option>
|
||||
<option value="ru">ru</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<!-- Donate button -->
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
||||
<input type="hidden" name="cmd" value="_s-xclick" />
|
||||
<input
|
||||
type="hidden"
|
||||
name="encrypted"
|
||||
value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaB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3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----
|
||||
"
|
||||
/>
|
||||
<input
|
||||
type="image"
|
||||
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
|
||||
border="0"
|
||||
name="submit"
|
||||
alt="PayPal - The safer, easier way to pay online!"
|
||||
/>
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="game-options-right-panel">
|
||||
<a class="a-link-button" href="https://bitburner.readthedocs.io/en/latest/changelog.html" target="_blank">
|
||||
Changelog
|
||||
</a>
|
||||
<a class="a-link-button" href="https://bitburner.readthedocs.io/en/latest/index.html" target="_blank"
|
||||
>Documentation</a
|
||||
<br />
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
||||
<input type="hidden" name="cmd" value="_s-xclick" />
|
||||
<input
|
||||
type="hidden"
|
||||
name="encrypted"
|
||||
value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+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="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
|
||||
name="submit"
|
||||
alt="PayPal - The safer, easier way to pay online!"
|
||||
/>
|
||||
</form>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Box>
|
||||
<Button onClick={() => props.save()}>Save Game</Button>
|
||||
<Button onClick={() => props.delete()}>Delete Game</Button>
|
||||
</Box>
|
||||
<Box>
|
||||
<Button onClick={() => props.export()}>Export Game</Button>
|
||||
<Button onClick={() => props.import()}>Import Game</Button>
|
||||
</Box>
|
||||
<Box>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the
|
||||
game. After using this, save the game and then reload the page. This is different then normal kill in
|
||||
that normal kill will tell the script to shut down while force kill just removes the references to it
|
||||
(and it should crash on it's own). This will not remove the files on your computer. Just forcefully
|
||||
kill all running instance of all scripts.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<a class="a-link-button" href="https://discord.gg/TFc3hKD" target="_blank">Discord</a>
|
||||
<a class="a-link-button" href="https://www.reddit.com/r/bitburner" target="_blank">Subreddit</a>
|
||||
<button id="save-game-link" class="a-link-button">Save Game</button>
|
||||
<button id="delete-game-link" class="a-link-button">Delete Game</button>
|
||||
<button id="export-game-link" class="a-link-button">Export Game</button>
|
||||
<input type="file" id="import-game-file-selector" name="file" />
|
||||
<button id="import-game-link" class="a-link-button">Import Game</button>
|
||||
<button id="copy-save-to-clipboard-link" class="std-button">Copy Save data to Clipboard</button>
|
||||
<button id="debug-delete-scripts-link" class="a-link-button tooltip">
|
||||
Force kill all active scripts
|
||||
<span class="tooltiptextleft">
|
||||
Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the
|
||||
game. After using this, save the game and then reload the page. This is different then normal kill in
|
||||
that normal kill will tell the script to shut down while force kill just removes the references to it
|
||||
(and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill
|
||||
all running instance of all scripts.
|
||||
</span>
|
||||
</button>
|
||||
<button id="debug-soft-reset" class="a-link-button tooltip">
|
||||
Soft Reset
|
||||
<span class="tooltiptextleft">
|
||||
Perform a soft reset. Resets everything as if you had just purchased an Augmentation.
|
||||
</span>
|
||||
</button>
|
||||
<button id="debug-files" class="a-link-button tooltip">
|
||||
Diagnose files
|
||||
<span class="tooltiptextleft">
|
||||
If your save file is extremely big you can use this button to view a map of all the files on every
|
||||
server. Be careful there might be spoilers.
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
*/
|
||||
<Button onClick={() => props.forceKill()}>Force kill all active scripts</Button>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
<Box>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
Perform a soft reset. Resets everything as if you had just purchased an Augmentation.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Button onClick={() => props.softReset()}>Soft Reset</Button>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
<Box>
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
If your save file is extremely big you can use this button to view a map of all the files on every
|
||||
server. Be careful there might be spoilers.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Button onClick={() => setDiagnosticOpen(true)}>Diagnose files</Button>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
<Box>
|
||||
<Link href="https://bitburner.readthedocs.io/en/latest/changelog.html" target="_blank">
|
||||
<Typography>Changelog</Typography>
|
||||
</Link>
|
||||
<Link href="https://bitburner.readthedocs.io/en/latest/index.html" target="_blank">
|
||||
<Typography>Documentation</Typography>
|
||||
</Link>
|
||||
<Link href="https://bitburner.readthedocs.io/en/latest/changelog.html" target="_blank">
|
||||
<Typography>Changelog</Typography>
|
||||
</Link>
|
||||
<Link href="https://discord.gg/TFc3hKD" target="_blank">
|
||||
<Typography>Discord</Typography>
|
||||
</Link>
|
||||
<Link href="https://www.reddit.com/r/bitburner" target="_blank">
|
||||
<Typography>Reddit</Typography>
|
||||
</Link>
|
||||
</Box>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Modal open={diagnosticOpen} close={() => setDiagnosticOpen(false)}>
|
||||
<FileDiagnosticPopup />
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
47
src/ui/React/Modal.tsx
Normal file
47
src/ui/React/Modal.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import React from "react";
|
||||
import { makeStyles, createStyles, Theme } from "@material-ui/core";
|
||||
import M from "@material-ui/core/Modal";
|
||||
import Backdrop from "@material-ui/core/Backdrop";
|
||||
import Fade from "@material-ui/core/Fade";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
modal: {
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
},
|
||||
paper: {
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
border: "2px solid " + theme.palette.primary.main,
|
||||
boxShadow: theme.shadows[5],
|
||||
padding: theme.spacing(2, 4, 3),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
close: () => void;
|
||||
children: JSX.Element[] | JSX.Element;
|
||||
}
|
||||
|
||||
export const Modal = (props: IProps): React.ReactElement => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<M
|
||||
open={props.open}
|
||||
onClose={props.close}
|
||||
closeAfterTransition
|
||||
className={classes.modal}
|
||||
BackdropComponent={Backdrop}
|
||||
BackdropProps={{
|
||||
timeout: 500,
|
||||
}}
|
||||
>
|
||||
<Fade in={props.open}>
|
||||
<div className={classes.paper}>{props.children}</div>
|
||||
</Fade>
|
||||
</M>
|
||||
);
|
||||
};
|
@ -14,6 +14,7 @@ export const colors = {
|
||||
secondary: "#888",
|
||||
secondarydark: "#666",
|
||||
|
||||
welllight: "#444",
|
||||
well: "#222",
|
||||
white: "#fff",
|
||||
black: "#000",
|
||||
@ -36,6 +37,9 @@ export const theme = createMuiTheme({
|
||||
main: colors.error,
|
||||
dark: colors.errordark,
|
||||
},
|
||||
background: {
|
||||
paper: colors.well,
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
fontFamily: "monospace",
|
||||
@ -150,12 +154,25 @@ export const theme = createMuiTheme({
|
||||
backgroundColor: colors.black,
|
||||
},
|
||||
paperAnchorDockedLeft: {
|
||||
borderRight: "1px solid #444",
|
||||
borderRight: "1px solid " + colors.welllight,
|
||||
},
|
||||
},
|
||||
MuiDivider: {
|
||||
root: {
|
||||
backgroundColor: "#444",
|
||||
backgroundColor: colors.welllight,
|
||||
},
|
||||
},
|
||||
MuiFormControlLabel: {
|
||||
root: {
|
||||
color: colors.primary,
|
||||
},
|
||||
},
|
||||
MuiSwitch: {
|
||||
switchBase: {
|
||||
color: colors.primarydark,
|
||||
},
|
||||
track: {
|
||||
backgroundColor: colors.welllight,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -122,6 +122,11 @@ export enum Page {
|
||||
* Purchase Resleeves
|
||||
*/
|
||||
Resleeves = "Re-sleeving",
|
||||
|
||||
/**
|
||||
* Game options
|
||||
*/
|
||||
GameOptions = "GameOptions",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,4 +55,7 @@ export function postContent(input: string, config: IPostContentConfig = {}): voi
|
||||
function scrollTerminalToBottom(): void {
|
||||
const container: HTMLElement = getElementById("terminal-container");
|
||||
container.scrollTop = container.scrollHeight;
|
||||
const td = document.getElementById("terminal-input-td");
|
||||
if (td === null) throw new Error("terminal-input-td should not be null");
|
||||
td.scrollIntoView(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user