Merge pull request #1460 from danielyxie/dev

few bugfix
This commit is contained in:
hydroflame 2021-10-11 14:27:21 -04:00 committed by GitHub
commit 944360f846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 21 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -720,7 +720,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
hacknet: hacknet,
sprintf: sprintf,
vsprintf: vsprintf,
scan: function (ip: any = workerScript.hostname, hostnames: any = true): any {
scan: function (ip: any = workerScript.hostname): any {
updateDynamicRam("scan", getRamCost("scan"));
const server = GetServer(ip);
if (server == null) {
@ -728,14 +728,9 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
}
const out = [];
for (let i = 0; i < server.serversOnNetwork.length; i++) {
let entry;
const s = getServerOnNetwork(server, i);
if (s === null) continue;
if (hostnames) {
entry = s.hostname;
} else {
entry = s.hostname;
}
const entry = s.hostname;
if (entry == null) {
continue;
}

@ -2,6 +2,8 @@ import React, { useState } from "react";
import { Modal } from "./Modal";
import Button from "@mui/material/Button";
import Typography from "@mui/material/Typography";
import Tooltip from "@mui/material/Tooltip";
import Paper from "@mui/material/Paper";
import TextField from "@mui/material/TextField";
import IconButton from "@mui/material/IconButton";
import ReplyIcon from "@mui/icons-material/Reply";
@ -87,17 +89,22 @@ export function ThemeEditorModal(props: IProps): React.ReactElement {
return (
<Modal open={props.open} onClose={props.onClose}>
<Button color="primary">primary</Button>
<Button color="secondary">secondary</Button>
<Button color="warning">warning</Button>
<Button color="info">info</Button>
<Button color="error">error</Button>
<Typography color="primary">primary</Typography>
<Typography color="secondary">secondary</Typography>
<Typography color="warning">warning</Typography>
<Typography color="info">info</Typography>
<Typography color="error">error</Typography>
<Paper>
<Tooltip open={true} placement={"top"} title={<Typography>Example tooltip</Typography>}>
<Button color="primary">primary button</Button>
</Tooltip>
<Button color="secondary">secondary button</Button>
<Button color="warning">warning button</Button>
<Button color="info">info button</Button>
<Button color="error">error button</Button>
<Button disabled>disabled button</Button>
<Typography color="primary">text with primary color</Typography>
<Typography color="secondary">text with secondary color</Typography>
<Typography color="error">text with error color</Typography>
<TextField value={"Text field"} />
</Paper>
<br />
<Typography>Warning: Editing the theme is very slow.</Typography>
<ColorEditor
name="primarylight"
onColorChange={onColorChange}