From 2649264cd96b57b5e919e23a9fcc8b6557a91b87 Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 18:47:15 -0600 Subject: [PATCH 1/7] Is this enough to not get softlocked? --- src/ui/GameRoot.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 74ac4927c..6ebc4b280 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -7,12 +7,11 @@ import { Player } from "@player"; import { installAugmentations } from "../Augmentation/AugmentationHelpers"; import { saveObject } from "../SaveObject"; import { onExport } from "../ExportBonus"; -import { LocationName } from "@enums"; +import { CompletedProgramName, LocationName } from "@enums"; import { ITutorial, iTutorialStart } from "../InteractiveTutorial"; import { InteractiveTutorialRoot } from "./InteractiveTutorial/InteractiveTutorialRoot"; import { ITutorialEvents } from "./InteractiveTutorial/ITutorialEvents"; -import { prestigeAugmentation } from "../Prestige"; import { prestigeWorkerScripts } from "../NetscriptWorker"; import { dialogBoxCreate } from "./React/DialogBox"; import { GetAllServers } from "../Server/AllServers"; @@ -77,6 +76,7 @@ import { GoRoot } from "../Go/ui/GoRoot"; import { Settings } from "../Settings/Settings"; import { isBitNodeFinished } from "../BitNode/BitNodeUtils"; import { exceptionAlert } from "../utils/helpers/exceptionAlert"; +import { SpecialServers } from "src/Server/data/SpecialServers"; const htmlLocation = location; @@ -354,7 +354,8 @@ export function GameRoot(): React.ReactElement { forceKill={killAllScripts} softReset={softReset} reactivateTutorial={() => { - prestigeAugmentation(); + Player.getHomeComputer().pushProgram(CompletedProgramName.nuke); + Player.currentServer = SpecialServers.Home; Router.toPage(Page.Terminal); iTutorialStart(); }} From dfcb01228eb46ec2c3a3848bd9fe53fbbe2fc5d2 Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 18:50:50 -0600 Subject: [PATCH 2/7] vscode not auto importing correctly idk --- src/ui/GameRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 6ebc4b280..0386f80b1 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -76,7 +76,7 @@ import { GoRoot } from "../Go/ui/GoRoot"; import { Settings } from "../Settings/Settings"; import { isBitNodeFinished } from "../BitNode/BitNodeUtils"; import { exceptionAlert } from "../utils/helpers/exceptionAlert"; -import { SpecialServers } from "src/Server/data/SpecialServers"; +import { SpecialServers } from "../Server/data/SpecialServers"; const htmlLocation = location; From e1f935fea9dbad40ea53a6928a2db10eaa256a8e Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 18:56:13 -0600 Subject: [PATCH 3/7] Clear scripts before starting the tutorial. --- src/ui/GameRoot.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 0386f80b1..10403ee56 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -354,6 +354,7 @@ export function GameRoot(): React.ReactElement { forceKill={killAllScripts} softReset={softReset} reactivateTutorial={() => { + prestigeWorkerScripts() Player.getHomeComputer().pushProgram(CompletedProgramName.nuke); Player.currentServer = SpecialServers.Home; Router.toPage(Page.Terminal); From 1b10942c2e2cc6d896408e77c1a2f3ab05fe1300 Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 18:56:30 -0600 Subject: [PATCH 4/7] Clear scripts before starting tutorial. --- src/ui/GameRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 10403ee56..3a23192ef 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -354,7 +354,7 @@ export function GameRoot(): React.ReactElement { forceKill={killAllScripts} softReset={softReset} reactivateTutorial={() => { - prestigeWorkerScripts() + prestigeWorkerScripts(); Player.getHomeComputer().pushProgram(CompletedProgramName.nuke); Player.currentServer = SpecialServers.Home; Router.toPage(Page.Terminal); From c69ff4cd5bc217b7788c4495435cd0dea4c8ac9a Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 18:58:25 -0600 Subject: [PATCH 5/7] Change confirmation message. --- src/GameOptions/ui/GameOptionsSidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GameOptions/ui/GameOptionsSidebar.tsx b/src/GameOptions/ui/GameOptionsSidebar.tsx index 0c190b5a1..19f9416f0 100644 --- a/src/GameOptions/ui/GameOptionsSidebar.tsx +++ b/src/GameOptions/ui/GameOptionsSidebar.tsx @@ -299,7 +299,7 @@ export const GameOptionsSidebar = (props: IProps): React.ReactElement => { open={confirmResetOpen} onClose={() => setConfirmResetOpen(false)} onConfirm={props.reactivateTutorial} - confirmationText={"Reset your stats and money to start the tutorial? Home scripts will not be reset."} + confirmationText={"Restart the tutorial? Running scripts will be killed."} additionalButton={} /> From 333db7ccb59ce37f7718c88e7899125832324816 Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 23:19:50 -0600 Subject: [PATCH 6/7] Update src/ui/GameRoot.tsx Co-authored-by: catloversg <152669316+catloversg@users.noreply.github.com> --- src/ui/GameRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 3a23192ef..7386779d6 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -356,7 +356,7 @@ export function GameRoot(): React.ReactElement { reactivateTutorial={() => { prestigeWorkerScripts(); Player.getHomeComputer().pushProgram(CompletedProgramName.nuke); - Player.currentServer = SpecialServers.Home; + Terminal.connectToServer(SpecialServers.Home); Router.toPage(Page.Terminal); iTutorialStart(); }} From ee17ffb02eea48ae74dec1f0e2ff1c05fcf1dfda Mon Sep 17 00:00:00 2001 From: Paul Dejean Date: Mon, 3 Mar 2025 23:23:09 -0600 Subject: [PATCH 7/7] missing import --- src/ui/GameRoot.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 7386779d6..67bdfa7ed 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -40,6 +40,7 @@ import { ProgramsRoot } from "../Programs/ui/ProgramsRoot"; import { ScriptEditorRoot } from "../ScriptEditor/ui/ScriptEditorRoot"; import { MilestonesRoot } from "../Milestones/ui/MilestonesRoot"; import { TerminalRoot } from "../Terminal/ui/TerminalRoot"; +import { Terminal } from "../Terminal"; import { DocumentationRoot } from "../Documentation/ui/DocumentationRoot"; import { ActiveScriptsRoot } from "./ActiveScripts/ActiveScriptsRoot"; import { FactionsRoot } from "../Faction/ui/FactionsRoot";