mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 03:00:56 +02:00
commit1
This commit is contained in:
+10
-16
@@ -6,18 +6,12 @@ import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { Player } from "../../Player";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
import { IEngine } from "../../IEngine";
|
||||
|
||||
// Update as additional BitNodes get implemented
|
||||
|
||||
interface IProps {
|
||||
player: IPlayer;
|
||||
engine: IEngine;
|
||||
}
|
||||
|
||||
export function Entropy(props: IProps): React.ReactElement {
|
||||
export function Entropy(): React.ReactElement {
|
||||
return (
|
||||
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
@@ -28,20 +22,20 @@ export function Entropy(props: IProps): React.ReactElement {
|
||||
label="Set entropy"
|
||||
placeholder="entropy"
|
||||
add={(num) => {
|
||||
props.player.entropy += num;
|
||||
props.player.applyEntropy(props.player.entropy);
|
||||
Player.entropy += num;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
subtract={(num) => {
|
||||
props.player.entropy -= num;
|
||||
props.player.applyEntropy(props.player.entropy);
|
||||
Player.entropy -= num;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
tons={() => {
|
||||
props.player.entropy += 1e12;
|
||||
props.player.applyEntropy(props.player.entropy);
|
||||
Player.entropy += 1e12;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
reset={() => {
|
||||
props.player.entropy = 0;
|
||||
props.player.applyEntropy(props.player.entropy);
|
||||
Player.entropy = 0;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}}
|
||||
/>
|
||||
</AccordionDetails>
|
||||
|
||||
Reference in New Issue
Block a user