Merge pull request #1469 from danielyxie/dev

Add blade action in character overview
This commit is contained in:
hydroflame 2021-10-12 16:07:02 -04:00 committed by GitHub
commit 8dad3e7ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 16 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

@ -29,5 +29,4 @@ export function loadPlayer(saveString: string): void {
} }
Player.exploits = sanitizeExploits(Player.exploits); Player.exploits = sanitizeExploits(Player.exploits);
console.log(Player.bladeburner);
} }

@ -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 { function Work(): React.ReactElement {
const player = use.Player(); const player = use.Player();
const router = use.Router(); const router = use.Router();
@ -269,6 +294,7 @@ export function CharacterOverview({ save }: IProps): React.ReactElement {
</TableCell> </TableCell>
</TableRow> </TableRow>
<Work /> <Work />
<Bladeburner />
<TableRow> <TableRow>
<TableCell align="center" colSpan={2} classes={{ root: classes.cellNone }}> <TableCell align="center" colSpan={2} classes={{ root: classes.cellNone }}>