Merge pull request #1412 from danielyxie/dev

fix logbox newlines and corp researching multiple times
This commit is contained in:
hydroflame 2021-10-04 12:37:35 -04:00 committed by GitHub
commit 15df0361e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -122,7 +122,7 @@ function WarehouseRoot(props: IProps): React.ReactElement {
</>
);
}
console.log(division.products);
for (const prodName in division.products) {
const prod = division.products[prodName];
if (prod === undefined) continue;

@ -25,7 +25,7 @@ function Upgrade({ n, division }: INodeProps): React.ReactElement {
const [open, setOpen] = useState(false);
if (n === null) return <></>;
const r = ResearchMap[n.text];
let disabled = division.sciResearch.qty < r.cost;
let disabled = division.sciResearch.qty < r.cost || n.researched;
const parent = n.parent;
if (parent !== null) {
disabled = disabled || !parent.researched;

@ -147,7 +147,7 @@ function LogWindow(props: IProps): React.ReactElement {
</Box>
</Paper>
<Paper>
<Box maxHeight="25vh" overflow="scroll" sx={{ overflowWrap: "break-word" }}>
<Box maxHeight="25vh" overflow="scroll" sx={{ overflowWrap: "break-word", whiteSpace: "pre-line" }}>
{props.script.logs.map(
(line: string, i: number): JSX.Element => (
<Typography key={i}>