mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
MISC: Improve tutorial, documentation and discoverability of NS API documentation (#1697)
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
} from "../../InteractiveTutorial";
|
||||
import { useRerender } from "../React/hooks";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { NsApiDocumentationLink } from "../React/NsApiDocumentationLink";
|
||||
|
||||
interface IContent {
|
||||
content: React.ReactElement;
|
||||
@@ -339,10 +340,11 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
<Typography classes={{ root: classes.code }}>
|
||||
{
|
||||
<CopyableText
|
||||
value={`export async function main(ns) {
|
||||
while(true) {
|
||||
await ns.hack('n00dles');
|
||||
}
|
||||
value={`/** @param {NS} ns */
|
||||
export async function main(ns) {
|
||||
while (true) {
|
||||
await ns.hack("n00dles");
|
||||
}
|
||||
}`}
|
||||
/>
|
||||
}
|
||||
@@ -352,6 +354,9 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
continuously hack the n00dles server.
|
||||
<br />
|
||||
<br />
|
||||
To access <NsApiDocumentationLink />, press the link at the bottom.
|
||||
<br />
|
||||
<br />
|
||||
To save and close the script editor, press the button at the bottom.
|
||||
</Typography>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user