mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #2103 from mikomyazaki/dev-options-add-minimise-server-money
Adds dev options to set server(s) cash to zero
This commit is contained in:
commit
e83c38b5fb
@ -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 (
|
return (
|
||||||
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
||||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||||
@ -119,6 +133,12 @@ export function Servers(): React.ReactElement {
|
|||||||
<td>
|
<td>
|
||||||
<Typography>Money:</Typography>
|
<Typography>Money:</Typography>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<Button onClick={minMoney}>Min one</Button>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<Button onClick={minAllMoney}>Min all</Button>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button onClick={maxMoney}>Max one</Button>
|
<Button onClick={maxMoney}>Max one</Button>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user