mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
commit
7db3716256
@ -99,7 +99,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.log-box-log-container {
|
.log-box-log-container {
|
||||||
max-width: 400px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
1
dist/engineStyle.css
vendored
1
dist/engineStyle.css
vendored
@ -2433,7 +2433,6 @@ input[type="checkbox"] {
|
|||||||
justify-content: space-between; }
|
justify-content: space-between; }
|
||||||
|
|
||||||
.log-box-log-container {
|
.log-box-log-container {
|
||||||
max-width: 400px;
|
|
||||||
overflow-y: auto; }
|
overflow-y: auto; }
|
||||||
|
|
||||||
.log-box-button {
|
.log-box-button {
|
||||||
|
3
src/InteractiveTutorial.d.ts
vendored
Normal file
3
src/InteractiveTutorial.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare function iTutorialNextStep(): void;
|
||||||
|
export declare const ITutorial: {isRunning: boolean, currStep: number};
|
||||||
|
export declare const iTutorialSteps: {[key: string]: number};
|
@ -23,6 +23,11 @@ import { libSource } from "../NetscriptDefinitions";
|
|||||||
import { NetscriptFunctions } from "../../NetscriptFunctions";
|
import { NetscriptFunctions } from "../../NetscriptFunctions";
|
||||||
import { WorkerScript } from "../../Netscript/WorkerScript";
|
import { WorkerScript } from "../../Netscript/WorkerScript";
|
||||||
import { Settings } from "../../Settings/Settings";
|
import { Settings } from "../../Settings/Settings";
|
||||||
|
import {
|
||||||
|
iTutorialNextStep,
|
||||||
|
ITutorial,
|
||||||
|
iTutorialSteps,
|
||||||
|
} from "../../InteractiveTutorial";
|
||||||
|
|
||||||
let symbols: string[] = [];
|
let symbols: string[] = [];
|
||||||
(function() {
|
(function() {
|
||||||
@ -81,35 +86,34 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(hydroflame): re-enable the tutorial.
|
// TODO(hydroflame): re-enable the tutorial.
|
||||||
// if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {
|
if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {
|
||||||
// //Make sure filename + code properly follow tutorial
|
//Make sure filename + code properly follow tutorial
|
||||||
// if (filename !== "n00dles.script") {
|
if (filename !== "n00dles.script") {
|
||||||
// dialogBoxCreate("Leave the script name as 'n00dles'!");
|
dialogBoxCreate("Leave the script name as 'n00dles'!");
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// code = code.replace(/\s/g, "");
|
if (code.replace(/\s/g, "").indexOf("while(true){hack('n00dles');}") == -1) {
|
||||||
// if (code.indexOf("while(true){hack('n00dles');}") == -1) {
|
dialogBoxCreate("Please copy and paste the code from the tutorial!");
|
||||||
// dialogBoxCreate("Please copy and paste the code from the tutorial!");
|
return;
|
||||||
// return;
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// //Save the script
|
//Save the script
|
||||||
// let s = Player.getCurrentServer();
|
const s = props.player.getCurrentServer();
|
||||||
// for (var i = 0; i < s.scripts.length; i++) {
|
for (let i = 0; i < s.scripts.length; i++) {
|
||||||
// if (filename == s.scripts[i].filename) {
|
if (filename == s.scripts[i].filename) {
|
||||||
// s.scripts[i].saveScript(getCurrentEditor().getCode(), Player.currentServer, Player.getCurrentServer().scripts);
|
s.scripts[i].saveScript(code, props.player.currentServer, props.player.getCurrentServer().scripts);
|
||||||
// Engine.loadTerminalContent();
|
props.engine.loadTerminalContent();
|
||||||
// return iTutorialNextStep();
|
return iTutorialNextStep();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // If the current script does NOT exist, create a new one
|
// If the current script does NOT exist, create a new one
|
||||||
// let script = new Script();
|
let script = new Script();
|
||||||
// script.saveScript(getCurrentEditor().getCode(), Player.currentServer, Player.getCurrentServer().scripts);
|
script.saveScript(code, props.player.currentServer, props.player.getCurrentServer().scripts);
|
||||||
// s.scripts.push(script);
|
s.scripts.push(script);
|
||||||
|
|
||||||
// return iTutorialNextStep();
|
return iTutorialNextStep();
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (filename == "") {
|
if (filename == "") {
|
||||||
dialogBoxCreate("You must specify a filename!");
|
dialogBoxCreate("You must specify a filename!");
|
||||||
|
Loading…
Reference in New Issue
Block a user