MISC: Add an option to run b1t_flume with a "quick" option (#1072)

This commit is contained in:
TheAimMan 2024-02-10 04:14:11 -05:00 committed by GitHub
parent 4d551915b3
commit e966e78b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -11,6 +11,8 @@ import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { BitFlumeEvent } from "../BitNode/ui/BitFlumeModal"; import { BitFlumeEvent } from "../BitNode/ui/BitFlumeModal";
import { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from "../Hacking"; import { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from "../Hacking";
import { CompletedProgramName, FactionName } from "@enums"; import { CompletedProgramName, FactionName } from "@enums";
import { Router } from "../ui/GameRoot";
import { Page } from "../ui/Router";
function requireHackingLevel(lvl: number) { function requireHackingLevel(lvl: number) {
return function () { return function () {
@ -278,8 +280,14 @@ export const Programs: Record<CompletedProgramName, Program> = {
req: bitFlumeRequirements(), req: bitFlumeRequirements(),
time: CONSTANTS.MillisecondsPerFiveMinutes / 20, time: CONSTANTS.MillisecondsPerFiveMinutes / 20,
}, },
run: (): void => { run: (args: string[]): void => {
if (args.length == 1) {
if (args[0] == "-q") {
Router.toPage(Page.BitVerse, { flume: true, quick: true });
}
} else {
BitFlumeEvent.emit(); BitFlumeEvent.emit();
}
}, },
}), }),
[CompletedProgramName.flight]: new Program({ [CompletedProgramName.flight]: new Program({