返回提交历史
Modified
config-vanilla.json
+0
-1
Modified
src/controllers/api/inventoryController.ts
+0
-20
Added
src/controllers/custom/unlockAllProfitTakerStagesController.ts
+24
-0
Modified
src/routes/custom.ts
+2
-0
Modified
src/services/configService.ts
+1
-1
Modified
static/webui/index.html
+1
-4
Modified
static/webui/script.js
+6
-0
Modified
static/webui/translations/de.js
+1
-0
Modified
static/webui/translations/en.js
+1
-0
Modified
static/webui/translations/es.js
+1
-0
Modified
static/webui/translations/fr.js
+1
-0
Modified
static/webui/translations/ru.js
+1
-0
Modified
static/webui/translations/uk.js
+1
-0
Modified
static/webui/translations/zh.js
+1
-0
XFEstudio/SpaceNinjaServer
chore: move unlock all profit taker stages to a per-account button (#2717)
Re #2361, generated with OpenAI Codex. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2717 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
b4e789bf
代码差异
14 个文件
+41
-26
@@ -18,7 +18,6 @@
18
18
"unlockAllSkins": false,
19
19
"unlockAllCapturaScenes": false,
20
20
"fullyStockedVendors": false,
21
"unlockAllProfitTakerStages": false,
22
21
"skipClanKeyCrafting": false,
23
22
"noDojoRoomBuildStage": false,
24
23
"noDecoBuildStage": false,
@@ -486,19 +486,6 @@ export const getInventoryResponse = async (
486
486
}
487
487
}
488
488
489
if (config.unlockAllProfitTakerStages) {
490
inventoryResponse.CompletedJobChains ??= [];
491
const EudicoHeists = inventoryResponse.CompletedJobChains.find(x => x.LocationTag == "EudicoHeists");
492
if (EudicoHeists) {
493
EudicoHeists.Jobs = allEudicoHeistJobs;
494
} else {
495
inventoryResponse.CompletedJobChains.push({
496
LocationTag: "EudicoHeists",
497
Jobs: allEudicoHeistJobs
498
});
499
}
500
}
501
502
489
if (config.unlockAllSimarisResearchEntries) {
503
490
inventoryResponse.LibraryPersonalTarget = undefined;
504
491
inventoryResponse.LibraryPersonalProgress = [
@@ -515,13 +502,6 @@ export const getInventoryResponse = async (
515
502
return inventoryResponse;
516
503
};
517
504
518
const allEudicoHeistJobs = [
519
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyOne",
520
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyTwo",
521
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyThree",
522
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour"
523
];
524
525
505
const getExpRequiredForMr = (rank: number): number => {
526
506
if (rank <= 30) {
527
507
return 2500 * rank * rank;
@@ -0,0 +1,24 @@
1
import { getInventory } from "../../services/inventoryService.ts";
2
import { getAccountIdForRequest } from "../../services/loginService.ts";
3
import type { RequestHandler } from "express";
4
5
const allEudicoHeistJobs = [
6
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyOne",
7
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyTwo",
8
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyThree",
9
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour"
10
];
11
12
export const unlockAllProfitTakerStagesController: RequestHandler = async (req, res) => {
13
const accountId = await getAccountIdForRequest(req);
14
const inventory = await getInventory(accountId, "CompletedJobChains");
15
inventory.CompletedJobChains ??= [];
16
const chain = inventory.CompletedJobChains.find(x => x.LocationTag == "EudicoHeists");
17
if (chain) {
18
chain.Jobs = allEudicoHeistJobs;
19
} else {
20
inventory.CompletedJobChains.push({ LocationTag: "EudicoHeists", Jobs: allEudicoHeistJobs });
21
}
22
await inventory.save();
23
res.end();
24
};
@@ -14,6 +14,7 @@ import { addMissingMaxRankModsController } from "../controllers/custom/addMissin
14
14
import { webuiFileChangeDetectedController } from "../controllers/custom/webuiFileChangeDetectedController.ts";
15
15
import { completeAllMissionsController } from "../controllers/custom/completeAllMissionsController.ts";
16
16
import { addMissingHelminthBlueprintsController } from "../controllers/custom/addMissingHelminthBlueprintsController.ts";
17
import { unlockAllProfitTakerStagesController } from "../controllers/custom/unlockAllProfitTakerStagesController.ts";
17
18
18
19
import { abilityOverrideController } from "../controllers/custom/abilityOverrideController.ts";
19
20
import { createAccountController } from "../controllers/custom/createAccountController.ts";
@@ -48,6 +49,7 @@ customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
48
49
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
49
50
customRouter.get("/completeAllMissions", completeAllMissionsController);
50
51
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
52
customRouter.get("/unlockAllProfitTakerStages", unlockAllProfitTakerStagesController);
51
53
52
54
customRouter.post("/abilityOverride", abilityOverrideController);
53
55
customRouter.post("/createAccount", createAccountController);
@@ -26,7 +26,6 @@ export interface IConfig extends IConfigRemovedOptions {
26
26
unlockAllCapturaScenes?: boolean;
27
27
unlockAllDecoRecipes?: boolean;
28
28
fullyStockedVendors?: boolean;
29
unlockAllProfitTakerStages?: boolean;
30
29
skipClanKeyCrafting?: boolean;
31
30
noDojoRoomBuildStage?: boolean;
32
31
noDojoDecoBuildStage?: boolean;
@@ -105,6 +104,7 @@ export const configRemovedOptionsKeys = [
105
104
"unlockDoubleCapacityPotatoesEverywhere",
106
105
"unlockExilusEverywhere",
107
106
"unlockArcanesEverywhere",
107
"unlockAllProfitTakerStages",
108
108
"noDailyStandingLimits",
109
109
"noDailyFocusLimit",
110
110
"noArgonCrystalDecay",
@@ -795,6 +795,7 @@
795
795
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
796
796
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
797
797
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
798
<button class="btn btn-primary" onclick="debounce(doUnlockAllProfitTakerStages);" data-loc="cheats_unlockAllProfitTakerStages"></button>
798
799
</div>
799
800
<form class="mt-2" onsubmit="doChangeSupportedSyndicate(); return false;">
800
801
<label class="form-label" for="changeSyndicate" data-loc="cheats_changeSupportedSyndicate"></label>
@@ -850,10 +851,6 @@
850
851
<input class="form-check-input" type="checkbox" id="fullyStockedVendors" />
851
852
<label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label>
852
853
</div>
853
<div class="form-check">
854
<input class="form-check-input" type="checkbox" id="unlockAllProfitTakerStages" />
855
<label class="form-check-label" for="unlockAllProfitTakerStages" data-loc="cheats_unlockAllProfitTakerStages"></label>
856
</div>
857
854
<div class="form-check">
858
855
<input class="form-check-input" type="checkbox" id="skipClanKeyCrafting" />
859
856
<label class="form-check-label" for="skipClanKeyCrafting" data-loc="cheats_skipClanKeyCrafting"></label>
@@ -2719,6 +2719,12 @@ async function doUnlockAllMissions() {
2719
2719
toast(loc("cheats_unlockAllMissions_ok"));
2720
2720
}
2721
2721
2722
async function doUnlockAllProfitTakerStages() {
2723
await revalidateAuthz();
2724
await fetch("/custom/unlockAllProfitTakerStages?" + window.authz);
2725
toast(loc("cheats_unlockSucc"));
2726
}
2727
2722
2728
const importSamples = {
2723
2729
maxFocus: {
2724
2730
FocusUpgrades: [
@@ -210,6 +210,7 @@ dict = {
210
210
cheats_baroFullyStocked: `Baro hat volles Inventar`,
211
211
cheats_syndicateMissionsRepeatable: `Syndikat-Missionen wiederholbar`,
212
212
cheats_unlockAllProfitTakerStages: `Alle Profiteintreiber-Phasen freischalten`,
213
cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`,
213
214
cheats_instantFinishRivenChallenge: `Riven-Mod Herausforderung sofort abschließen`,
214
215
cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
215
216
cheats_noResourceExtractorDronesDamage: `Kein Schaden für Ressourcen-Extraktor-Drohnen`,
@@ -209,6 +209,7 @@ dict = {
209
209
cheats_baroFullyStocked: `Baro Fully Stocked`,
210
210
cheats_syndicateMissionsRepeatable: `Syndicate Missions Repeatable`,
211
211
cheats_unlockAllProfitTakerStages: `Unlock All Profit Taker Stages`,
212
cheats_unlockSucc: `Successfully unlocked.`,
212
213
cheats_instantFinishRivenChallenge: `Instant Finish Riven Challenge`,
213
214
cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
214
215
cheats_noResourceExtractorDronesDamage: `No Resource Extractor Drones Damage`,
@@ -210,6 +210,7 @@ dict = {
210
210
cheats_baroFullyStocked: `Baro con stock completo`,
211
211
cheats_syndicateMissionsRepeatable: `Misiones de sindicato rejugables`,
212
212
cheats_unlockAllProfitTakerStages: `Desbloquea todas las etapas del Roba-ganancias`,
213
cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`,
213
214
cheats_instantFinishRivenChallenge: `Terminar desafío de agrietado inmediatamente`,
214
215
cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`,
215
216
cheats_noResourceExtractorDronesDamage: `Sin daño a los drones extractores de recursos`,
@@ -210,6 +210,7 @@ dict = {
210
210
cheats_baroFullyStocked: `Stock de Baro au max`,
211
211
cheats_syndicateMissionsRepeatable: `Mission syndicat répétables`,
212
212
cheats_unlockAllProfitTakerStages: `Débloquer toutes les étapes du Preneur de Profit`,
213
cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`,
213
214
cheats_instantFinishRivenChallenge: `Débloquer le challenge Riven instantanément`,
214
215
cheats_instantResourceExtractorDrones: `Ressources de drones d'extraction instantannées`,
215
216
cheats_noResourceExtractorDronesDamage: `Aucun dégâts aux drones d'extraction de resources`,
@@ -210,6 +210,7 @@ dict = {
210
210
cheats_baroFullyStocked: `Баро полностью укомплектован`,
211
211
cheats_syndicateMissionsRepeatable: `Повторять миссии синдиката`,
212
212
cheats_unlockAllProfitTakerStages: `Разблокировать все этапы Сферы извлечения прибыли`,
213
cheats_unlockSucc: `[UNTRANSLATED] Successfully unlocked.`,
213
214
cheats_instantFinishRivenChallenge: `Мгновенное завершение испытания мода Разлома`,
214
215
cheats_instantResourceExtractorDrones: `Мгновенно добывающие Дроны-сборщики`,
215
216
cheats_noResourceExtractorDronesDamage: `Без урона по Дронам-сборщикам`,