blade action in ui

This commit is contained in:
Olivier Gagnon 2021-10-12 16:06:32 -04:00
parent bf75cf80b8
commit 85aa67ac26
4 changed files with 41 additions and 15 deletions

24
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -46,6 +46,31 @@ function Intelligence(): React.ReactElement {
);
}
function Bladeburner(): React.ReactElement {
const player = use.Player();
const classes = useStyles();
const bladeburner = player.bladeburner;
if (bladeburner === null) return <></>;
const action = bladeburner.getTypeAndNameFromActionId(bladeburner.action);
if (action.type === "Idle") return <></>;
return (
<>
<TableRow>
<TableCell component="th" scope="row" colSpan={2} classes={{ root: classes.cellNone }}>
<Typography>Bladeburner:</Typography>
</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" colSpan={2} classes={{ root: classes.cellNone }}>
<Typography>
{action.type}: {action.name}
</Typography>
</TableCell>
</TableRow>
</>
);
}
function Work(): React.ReactElement {
const player = use.Player();
const router = use.Router();
@ -269,6 +294,7 @@ export function CharacterOverview({ save }: IProps): React.ReactElement {
</TableCell>
</TableRow>
<Work />
<Bladeburner />
<TableRow>
<TableCell align="center" colSpan={2} classes={{ root: classes.cellNone }}>