mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
No more player/router context
This commit is contained in:
@@ -6,7 +6,7 @@ import * as React from "react";
|
||||
|
||||
import { Money } from "../React/Money";
|
||||
import { MoneyRate } from "../React/MoneyRate";
|
||||
import { use } from "../Context";
|
||||
import { Player } from "../../Player";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
@@ -32,9 +32,8 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||
}),
|
||||
);
|
||||
export function ScriptProduction(): React.ReactElement {
|
||||
const player = use.Player();
|
||||
const classes = useStyles();
|
||||
const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);
|
||||
const prodRateSinceLastAug = Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000);
|
||||
|
||||
return (
|
||||
<Table size="small" classes={{ root: classes.size }}>
|
||||
@@ -45,7 +44,7 @@ export function ScriptProduction(): React.ReactElement {
|
||||
</TableCell>
|
||||
<TableCell align="left" classes={{ root: classes.cell }}>
|
||||
<Typography variant="body2">
|
||||
<Money money={player.scriptProdSinceLastAug} />
|
||||
<Money money={Player.scriptProdSinceLastAug} />
|
||||
</Typography>
|
||||
</TableCell>
|
||||
<TableCell align="left" classes={{ root: classes.cell }}>
|
||||
|
||||
Reference in New Issue
Block a user