Adds dev options to set server cash to zero.

This commit is contained in:
Andrew Cooper 2021-12-22 01:12:08 +00:00
parent ea0be338e1
commit 7baacf4e1b

@ -71,6 +71,20 @@ export function Servers(): React.ReactElement {
}
}
function minMoney(): void {
const s = GetServer(server);
if (s === null) return;
if (!(s instanceof Server)) return;
s.moneyAvailable = 0;
}
function minAllMoney(): void {
for (const s of GetAllServers()) {
if (!(s instanceof Server)) return;
s.moneyAvailable = 0;
}
}
return (
<Accordion TransitionProps={{ unmountOnExit: true }}>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@ -119,6 +133,12 @@ export function Servers(): React.ReactElement {
<td>
<Typography>Money:</Typography>
</td>
<td>
<Button onClick={minMoney}>Min one</Button>
</td>
<td>
<Button onClick={minAllMoney}>Min all</Button>
</td>
<td>
<Button onClick={maxMoney}>Max one</Button>
</td>