MISC: Improve tutorial, documentation and discoverability of NS API documentation (#1697)

This commit is contained in:
catloversg
2024-10-21 10:37:42 +07:00
committed by GitHub
parent a3e1b297ca
commit 6d8084f40e
6 changed files with 47 additions and 13 deletions

View File

@@ -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>
</>