mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 22:52:29 +01:00
make tutorial better
This commit is contained in:
parent
81e291ef6a
commit
ae6f8c5ee7
32
dist/vendor.bundle.js
vendored
32
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
@ -110,6 +110,6 @@
|
||||
"watch": "webpack --watch --mode production",
|
||||
"watch:dev": "webpack --watch --mode development",
|
||||
"electron": "cp -r electron/* .package && cp index.html .package && cp main.bundle.js .package && cp dist/vendor.bundle.js .package/dist/ && cp -r dist/ext .package/dist/ && electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png",
|
||||
"allbuild": "npm run build && npm run electron && git add --all && git commit --amend --no-edit"
|
||||
"allbuild": "npm run build && npm run electron && git add --all && git commit --amend --no-edit && git push -f -u origin dev"
|
||||
}
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ export class Terminal implements ITerminal {
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${__COMMIT_HASH__ || "DEV"})`, "primary")];
|
||||
this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, "primary")];
|
||||
TerminalEvents.emit();
|
||||
TerminalClearEvents.emit();
|
||||
}
|
||||
@ -671,6 +671,12 @@ export class Terminal implements ITerminal {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case iTutorialSteps.TerminalHackingMechanics:
|
||||
if (commandArray.length !== 1 || !["grow", "weaken", "hack"].includes(commandArray[0] + "")) {
|
||||
this.error("Bad command. Please follow the tutorial");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case iTutorialSteps.TerminalGoHome:
|
||||
if (commandArray.length == 1 && commandArray[0] == "home") {
|
||||
iTutorialNextStep();
|
||||
|
@ -1,20 +1,28 @@
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Link from "@mui/material/Link";
|
||||
import Box from "@mui/material/Box";
|
||||
import Button from "@mui/material/Button";
|
||||
import { ConfirmationModal } from "../../ui/React/ConfirmationModal";
|
||||
|
||||
interface IProps {
|
||||
reactivateTutorial: () => void;
|
||||
}
|
||||
|
||||
export function TutorialRoot(props: IProps): React.ReactElement {
|
||||
const [confirmResetOpen, setConfirmResetOpen] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Typography variant="h4">Tutorial / Documentation</Typography>
|
||||
<Box m={2}>
|
||||
<Button onClick={props.reactivateTutorial}>Soft reset and Restart tutorial</Button>
|
||||
<Button onClick={() => setConfirmResetOpen(true)}>Soft reset and Restart tutorial</Button>
|
||||
<ConfirmationModal
|
||||
open={confirmResetOpen}
|
||||
onClose={() => setConfirmResetOpen(false)}
|
||||
onConfirm={props.reactivateTutorial}
|
||||
confirmationText={"This will reset all your stats to 1 and money to 1k. Are you sure?"}
|
||||
/>
|
||||
<Link
|
||||
color="primary"
|
||||
target="_blank"
|
||||
@ -94,6 +102,14 @@ export function TutorialRoot(props: IProps): React.ReactElement {
|
||||
<Link color="primary" target="_blank" href="https://bitburner.readthedocs.io/en/latest/shortcuts.html">
|
||||
<Typography>Keyboard Shortcuts</Typography>
|
||||
</Link>
|
||||
<br />
|
||||
<Link
|
||||
color="primary"
|
||||
target="_blank"
|
||||
href="https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html#netscript-1-0-vs-netscript-2-0"
|
||||
>
|
||||
<Typography>NS1 vs NS1 (or .script vs .js)</Typography>
|
||||
</Link>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
|
@ -12,6 +12,7 @@ import { CopyableText } from "../React/CopyableText";
|
||||
import ListItem from "@mui/material/ListItem";
|
||||
import EqualizerIcon from "@mui/icons-material/Equalizer";
|
||||
import LastPageIcon from "@mui/icons-material/LastPage";
|
||||
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
||||
import HelpIcon from "@mui/icons-material/Help";
|
||||
import AccountTreeIcon from "@mui/icons-material/AccountTree";
|
||||
import StorageIcon from "@mui/icons-material/Storage";
|
||||
@ -58,6 +59,9 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
<br />
|
||||
<br />
|
||||
This tutorial will show you the basics of the game. You may skip the tutorial at any time.
|
||||
<br />
|
||||
<br />
|
||||
You can also click the eye symbol <VisibilityOffIcon /> to temporarily hide this tutorial.
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
@ -287,7 +291,9 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,
|
||||
then you will encounter diminishing returns in your hacking. You will need to use{" "}
|
||||
<Typography classes={{ root: classes.textfield }}>{"[n00dles ~/]> grow"}</Typography>
|
||||
and <Typography classes={{ root: classes.textfield }}>{"[n00dles ~/]> weaken"}</Typography>
|
||||
which tricks the company into adding money to their server and{" "}
|
||||
<Typography classes={{ root: classes.textfield }}>{"[n00dles ~/]> weaken"}</Typography>
|
||||
which increases the speed of hack and grow.
|
||||
</Typography>
|
||||
),
|
||||
canNext: true,
|
||||
@ -345,10 +351,6 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
continuously hack the n00dles server.
|
||||
<br />
|
||||
<br />
|
||||
If you're an intermediate programmer you should use ns2 instead. It is much faster and offers more
|
||||
possibilities.
|
||||
<br />
|
||||
<br />
|
||||
To save and close the script editor, press the button in the bottom left, or press ctrl + b.
|
||||
</Typography>
|
||||
</>
|
||||
@ -447,7 +449,11 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
<br />
|
||||
<br />
|
||||
If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy
|
||||
the game much more.
|
||||
the game much more. NS1 files end with .script and are a subset of javascript. NS2 files end with .js and
|
||||
are full speed native javascript.
|
||||
<br />
|
||||
<br />
|
||||
You can learn more about the difference between them later in the documentation.
|
||||
<br />
|
||||
<br />
|
||||
For now, let's move on to something else!
|
||||
|
Loading…
Reference in New Issue
Block a user