mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 15:17:48 +02:00
MISC: enforce eslint react checks (#640)
This commit is contained in:
committed by
GitHub
parent
91bfb154b6
commit
1d5a735941
@@ -0,0 +1,44 @@
|
||||
import React from "react";
|
||||
|
||||
import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { Player } from "@player";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
|
||||
// TODO: Update as additional BitNodes get implemented
|
||||
|
||||
export function EntropyDev(): React.ReactElement {
|
||||
return (
|
||||
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography>Entropy</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Adjuster
|
||||
label="Set entropy"
|
||||
placeholder="entropy"
|
||||
add={(num) => {
|
||||
Player.entropy += num;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
subtract={(num) => {
|
||||
Player.entropy -= num;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
tons={() => {
|
||||
Player.entropy += 1e12;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
reset={() => {
|
||||
Player.entropy = 0;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
/>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user