mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
Display bonus time in sleeve detailed stats panel
Also adds a field to modify the stored cycles in the dev menu.
This commit is contained in:
@@ -8,6 +8,7 @@ import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
import Button from "@mui/material/Button";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
|
||||
interface IProps {
|
||||
player: IPlayer;
|
||||
@@ -38,6 +39,12 @@ export function Sleeves(props: IProps): React.ReactElement {
|
||||
}
|
||||
}
|
||||
|
||||
function sleeveSetStoredCycles(cycles: number): void {
|
||||
for (let i = 0; i < props.player.sleeves.length; ++i) {
|
||||
props.player.sleeves[i].storedCycles = cycles;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
@@ -68,6 +75,18 @@ export function Sleeves(props: IProps): React.ReactElement {
|
||||
<Button onClick={sleeveSyncClearAll}>Clear all</Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colSpan={3}>
|
||||
<Adjuster
|
||||
label="Stored Cycles"
|
||||
placeholder="cycles"
|
||||
tons={() => sleeveSetStoredCycles(10000000)}
|
||||
add={sleeveSetStoredCycles}
|
||||
subtract={sleeveSetStoredCycles}
|
||||
reset={() => sleeveSetStoredCycles(0)}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</AccordionDetails>
|
||||
|
||||
Reference in New Issue
Block a user