diff --git a/config-vanilla.json b/config-vanilla.json index d13eb84e..cce20a79 100644 --- a/config-vanilla.json +++ b/config-vanilla.json @@ -18,7 +18,6 @@ "unlockAllSkins": false, "unlockAllCapturaScenes": false, "fullyStockedVendors": false, - "unlockAllProfitTakerStages": false, "skipClanKeyCrafting": false, "noDojoRoomBuildStage": false, "noDecoBuildStage": false, diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 5a508f04..100f0a1a 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -486,19 +486,6 @@ export const getInventoryResponse = async ( } } - if (config.unlockAllProfitTakerStages) { - inventoryResponse.CompletedJobChains ??= []; - const EudicoHeists = inventoryResponse.CompletedJobChains.find(x => x.LocationTag == "EudicoHeists"); - if (EudicoHeists) { - EudicoHeists.Jobs = allEudicoHeistJobs; - } else { - inventoryResponse.CompletedJobChains.push({ - LocationTag: "EudicoHeists", - Jobs: allEudicoHeistJobs - }); - } - } - if (config.unlockAllSimarisResearchEntries) { inventoryResponse.LibraryPersonalTarget = undefined; inventoryResponse.LibraryPersonalProgress = [ @@ -515,13 +502,6 @@ export const getInventoryResponse = async ( return inventoryResponse; }; -const allEudicoHeistJobs = [ - "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyOne", - "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyTwo", - "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyThree", - "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour" -]; - const getExpRequiredForMr = (rank: number): number => { if (rank <= 30) { return 2500 * rank * rank; diff --git a/src/controllers/custom/unlockAllProfitTakerStagesController.ts b/src/controllers/custom/unlockAllProfitTakerStagesController.ts new file mode 100644 index 00000000..79fe3b87 --- /dev/null +++ b/src/controllers/custom/unlockAllProfitTakerStagesController.ts @@ -0,0 +1,24 @@ +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { RequestHandler } from "express"; + +const allEudicoHeistJobs = [ + "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyOne", + "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyTwo", + "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyThree", + "/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour" +]; + +export const unlockAllProfitTakerStagesController: RequestHandler = async (req, res) => { + const accountId = await getAccountIdForRequest(req); + const inventory = await getInventory(accountId, "CompletedJobChains"); + inventory.CompletedJobChains ??= []; + const chain = inventory.CompletedJobChains.find(x => x.LocationTag == "EudicoHeists"); + if (chain) { + chain.Jobs = allEudicoHeistJobs; + } else { + inventory.CompletedJobChains.push({ LocationTag: "EudicoHeists", Jobs: allEudicoHeistJobs }); + } + await inventory.save(); + res.end(); +}; diff --git a/src/routes/custom.ts b/src/routes/custom.ts index 58ab5c3c..6f10f563 100644 --- a/src/routes/custom.ts +++ b/src/routes/custom.ts @@ -14,6 +14,7 @@ import { addMissingMaxRankModsController } from "../controllers/custom/addMissin import { webuiFileChangeDetectedController } from "../controllers/custom/webuiFileChangeDetectedController.ts"; import { completeAllMissionsController } from "../controllers/custom/completeAllMissionsController.ts"; import { addMissingHelminthBlueprintsController } from "../controllers/custom/addMissingHelminthBlueprintsController.ts"; +import { unlockAllProfitTakerStagesController } from "../controllers/custom/unlockAllProfitTakerStagesController.ts"; import { abilityOverrideController } from "../controllers/custom/abilityOverrideController.ts"; import { createAccountController } from "../controllers/custom/createAccountController.ts"; @@ -48,6 +49,7 @@ customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController); customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController); customRouter.get("/completeAllMissions", completeAllMissionsController); customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController); +customRouter.get("/unlockAllProfitTakerStages", unlockAllProfitTakerStagesController); customRouter.post("/abilityOverride", abilityOverrideController); customRouter.post("/createAccount", createAccountController); diff --git a/src/services/configService.ts b/src/services/configService.ts index a75c5f2c..97817f76 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -26,7 +26,6 @@ export interface IConfig extends IConfigRemovedOptions { unlockAllCapturaScenes?: boolean; unlockAllDecoRecipes?: boolean; fullyStockedVendors?: boolean; - unlockAllProfitTakerStages?: boolean; skipClanKeyCrafting?: boolean; noDojoRoomBuildStage?: boolean; noDojoDecoBuildStage?: boolean; @@ -105,6 +104,7 @@ export const configRemovedOptionsKeys = [ "unlockDoubleCapacityPotatoesEverywhere", "unlockExilusEverywhere", "unlockArcanesEverywhere", + "unlockAllProfitTakerStages", "noDailyStandingLimits", "noDailyFocusLimit", "noArgonCrystalDecay", diff --git a/static/webui/index.html b/static/webui/index.html index ef74222b..834f5ea4 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -791,6 +791,7 @@ +
@@ -846,10 +847,6 @@ -
- - -
diff --git a/static/webui/script.js b/static/webui/script.js index 6feb4020..25f1ffe3 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -2719,6 +2719,12 @@ async function doUnlockAllMissions() { toast(loc("cheats_unlockAllMissions_ok")); } +async function doUnlockAllProfitTakerStages() { + await revalidateAuthz(); + await fetch("/custom/unlockAllProfitTakerStages?" + window.authz); + toast(loc("cheats_unlockSucc")); +} + const importSamples = { maxFocus: { FocusUpgrades: [ diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 42637903..75261de7 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `Baro hat volles Inventar`, cheats_syndicateMissionsRepeatable: `Syndikat-Missionen wiederholbar`, cheats_unlockAllProfitTakerStages: `Alle Profiteintreiber-Phasen freischalten`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Riven-Mod Herausforderung sofort abschließen`, cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`, cheats_noResourceExtractorDronesDamage: `Kein Schaden für Ressourcen-Extraktor-Drohnen`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 76fbfd3b..373e02fb 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -209,6 +209,7 @@ dict = { cheats_baroFullyStocked: `Baro Fully Stocked`, cheats_syndicateMissionsRepeatable: `Syndicate Missions Repeatable`, cheats_unlockAllProfitTakerStages: `Unlock All Profit Taker Stages`, + cheats_unlockSucc: `Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`, cheats_noResourceExtractorDronesDamage: `No Resource Extractor Drones Damage`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index e5ddb59d..26228af3 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `Baro con stock completo`, cheats_syndicateMissionsRepeatable: `Misiones de sindicato rejugables`, cheats_unlockAllProfitTakerStages: `Desbloquea todas las etapas del Roba-ganancias`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Terminar desafío de agrietado inmediatamente`, cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`, cheats_noResourceExtractorDronesDamage: `Sin daño a los drones extractores de recursos`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 2c802a8d..a4211826 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `Stock de Baro au max`, cheats_syndicateMissionsRepeatable: `Mission syndicat répétables`, cheats_unlockAllProfitTakerStages: `Débloquer toutes les étapes du Preneur de Profit`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Débloquer le challenge Riven instantanément`, cheats_instantResourceExtractorDrones: `Ressources de drones d'extraction instantannées`, cheats_noResourceExtractorDronesDamage: `Aucun dégâts aux drones d'extraction de resources`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 961d63ab..4b785286 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `Баро полностью укомплектован`, cheats_syndicateMissionsRepeatable: `Повторять миссии синдиката`, cheats_unlockAllProfitTakerStages: `Разблокировать все этапы Сферы извлечения прибыли`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Мгновенное завершение испытания мода Разлома`, cheats_instantResourceExtractorDrones: `Мгновенно добывающие Дроны-сборщики`, cheats_noResourceExtractorDronesDamage: `Без урона по Дронам-сборщикам`, diff --git a/static/webui/translations/uk.js b/static/webui/translations/uk.js index d820559c..98cc144a 100644 --- a/static/webui/translations/uk.js +++ b/static/webui/translations/uk.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `Баро повністю укомплектований`, cheats_syndicateMissionsRepeatable: `Повторювати місії синдиката`, cheats_unlockAllProfitTakerStages: `Розблокувати всі етапи Привласнювачки`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `Миттєве завершення випробування модифікатора Розколу`, cheats_instantResourceExtractorDrones: `Миттєво добуваючі Дрони-видобувачі`, cheats_noResourceExtractorDronesDamage: `Без шкоди по Дронам-видобувачам`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index bc199a17..b0b67191 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -210,6 +210,7 @@ dict = { cheats_baroFullyStocked: `虚空商人贩卖所有商品`, cheats_syndicateMissionsRepeatable: `集团任务可重复完成`, cheats_unlockAllProfitTakerStages: `解锁利润收割者圆蛛所有阶段`, + cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`, cheats_instantFinishRivenChallenge: `立即完成裂罅挑战`, cheats_instantResourceExtractorDrones: `资源无人机即时完成`, cheats_noResourceExtractorDronesDamage: `资源无人机不会损毁`,