mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
oops
This commit is contained in:
@@ -9,7 +9,7 @@ import { Options } from "./Options";
|
||||
import { js_beautify as beautifyCode } from "js-beautify";
|
||||
import { isValidFilePath } from "../../Terminal/DirectoryHelpers";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { IEngine } from "../../IEngine";
|
||||
import { IRouter } from "../../ui/Router";
|
||||
import { dialogBoxCreate } from "../../../utils/DialogBox";
|
||||
import { parseFconfSettings } from "../../Fconf/Fconf";
|
||||
import { isScriptFilename } from "../../Script/ScriptHelpersTS";
|
||||
@@ -53,7 +53,7 @@ interface IProps {
|
||||
filename: string;
|
||||
code: string;
|
||||
player: IPlayer;
|
||||
engine: IEngine;
|
||||
router: IRouter;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -103,7 +103,6 @@ export function Root(props: IProps): React.ReactElement {
|
||||
}
|
||||
lastPosition = null;
|
||||
|
||||
// TODO(hydroflame): re-enable the tutorial.
|
||||
if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {
|
||||
//Make sure filename + code properly follow tutorial
|
||||
if (filename !== "n00dles.script") {
|
||||
@@ -121,7 +120,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
for (let i = 0; i < server.scripts.length; i++) {
|
||||
if (filename == server.scripts[i].filename) {
|
||||
server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);
|
||||
props.engine.loadTerminalContent();
|
||||
props.router.toTerminal();
|
||||
return iTutorialNextStep();
|
||||
}
|
||||
}
|
||||
@@ -160,7 +159,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
for (let i = 0; i < server.scripts.length; i++) {
|
||||
if (filename == server.scripts[i].filename) {
|
||||
server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);
|
||||
props.engine.loadTerminalContent();
|
||||
props.router.toTerminal();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -173,7 +172,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
for (let i = 0; i < server.textFiles.length; ++i) {
|
||||
if (server.textFiles[i].fn === filename) {
|
||||
server.textFiles[i].write(code);
|
||||
props.engine.loadTerminalContent();
|
||||
props.router.toTerminal();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -183,7 +182,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
dialogBoxCreate("Invalid filename. Must be either a script (.script, .js, or .ns) or " + " or text file (.txt)");
|
||||
return;
|
||||
}
|
||||
props.engine.loadTerminalContent();
|
||||
props.router.toTerminal();
|
||||
}
|
||||
|
||||
function beautify(): void {
|
||||
|
||||
Reference in New Issue
Block a user