This commit is contained in:
Olivier Gagnon
2022-01-15 18:13:35 -05:00
parent 8d3c366e0e
commit d5c3d89613
2 changed files with 19 additions and 7 deletions

View File

@ -21,6 +21,9 @@ interface IProps {
export function SourceFiles(props: IProps): React.ReactElement {
function setSF(sfN: number, sfLvl: number) {
return function () {
if (sfN === 9) {
props.player.hacknetNodes = [];
}
if (sfLvl === 0) {
props.player.sourceFiles = props.player.sourceFiles.filter((sf) => sf.n !== sfN);
return;

View File

@ -97,7 +97,7 @@ const useStyles = makeStyles((theme: Theme) =>
display: "block",
padding: "8px",
minHeight: "100vh",
boxSizing: 'border-box',
boxSizing: "border-box",
},
}),
);
@ -511,6 +511,15 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
<Overview mode={ITutorial.isRunning ? "tutorial" : "overview"}>
{!ITutorial.isRunning ? (
<CharacterOverview save={() => saveObject.saveGame()} killScripts={killAllScripts} />
) : (
<InteractiveTutorialRoot />
)}
</Overview>
{withSidebar ? (
<Box display="flex" flexDirection="row" width="100%">
<SidebarRoot player={player} router={Router} page={page} />
<Box className={classes.root}>{mainPage}</Box>
</Box>
) : (
<Box className={classes.root}>{mainPage}</Box>
)}