update unlockAllQuests to use ExportKeys

This commit is contained in:
Sainan 2024-06-18 20:21:54 +02:00
parent f19eb83381
commit ddc9b9fce1
2 changed files with 6 additions and 44 deletions

View File

@ -5,12 +5,11 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
import { Request, RequestHandler, Response } from "express";
import { config } from "@/src/services/configService";
import allMissions from "@/static/fixed_responses/allMissions.json";
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
import allSkins from "@/static/fixed_responses/allSkins.json";
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
import { ExportFlavour } from "warframe-public-export-plus";
import { ExportFlavour, ExportKeys } from "warframe-public-export-plus";
const inventoryController: RequestHandler = async (request: Request, response: Response) => {
let accountId;
@ -51,9 +50,11 @@ const inventoryController: RequestHandler = async (request: Request, response: R
}
if (config.unlockAllQuests) {
for (const questKey of allQuestKeys) {
if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == questKey)) {
inventoryResponse.QuestKeys.push({ ItemType: questKey });
for (const [k, v] of Object.entries(ExportKeys)) {
if ("chainStages" in v) {
if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == k)) {
inventoryResponse.QuestKeys.push({ ItemType: k });
}
}
}
}

View File

@ -1,39 +0,0 @@
[
"/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain",
"/Lotus/Types/Keys/GlassQuest/GlassQuestKeyChain",
"/Lotus/Types/Keys/SolarisQuest/SolarisQuestKeyChain",
"/Lotus/Types/Keys/InfestedIntroQuest/InfestedIntroQuestKeyChain",
"/Lotus/Types/Keys/KubrowQuest/KubrowQuestKeyChain",
"/Lotus/Types/Keys/ArchwingQuest/ArchwingQuestKeyChain",
"/Lotus/Types/Keys/GetClemQuest/GetClemQuestKeyChain",
"/Lotus/Types/Keys/SpyQuestKeyChain/SpyQuestKeyChain",
"/Lotus/Types/Keys/DragonQuest/DragonQuestKeyChain",
"/Lotus/Types/Keys/LimboQuest/LimboQuestKeyChain",
"/Lotus/Types/Keys/SentientQuest/SentientQuestKeyChain",
"/Lotus/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain",
"/Lotus/Types/Keys/MirageQuest/MirageQuestKeyChain",
"/Lotus/Types/Keys/WarWithinQuest/WarWithinQuestKeyChain",
"/Lotus/Types/Keys/InfestedAladVQuest/InfestedAladVQuestKeyChain",
"/Lotus/Types/Keys/GolemQuest/GolemQuestKeyChainItem",
"/Lotus/Types/Keys/BardQuest/BardQuestKeyChain",
"/Lotus/Types/Keys/FairyQuest/FairyQuestKeyChain",
"/Lotus/Types/Keys/IndexQuest/IndexQuestKeyChain",
"/Lotus/Types/Keys/PriestFrameQuest/PriestQuestKeyChain",
"/Lotus/Types/Keys/ApostasyQuest/ApostasyKeyChain",
"/Lotus/Types/Keys/SacrificeQuest/SacrificeQuestKeyChain",
"/Lotus/Types/Keys/ChimeraQuest/ChimeraKeyChain",
"/Lotus/Types/Keys/MummyQuest/MummyQuestKeyChain",
"/Lotus/Types/Keys/RailJackBuildQuest/RailjackBuildQuestKeyChain",
"/Lotus/Types/Keys/NewWarIntroQuest/NewWarIntroKeyChain",
"/Lotus/Types/Keys/ProteaQuest/ProteaQuestKeyChain",
"/Lotus/Types/Keys/RevenantQuest/RevenantQuestKeyChain",
"/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain",
"/Lotus/Types/Keys/WraithQuest/WraithQuestKeyChain",
"/Lotus/Types/Keys/YareliQuest/YareliQuestKeyChain",
"/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain",
"/Lotus/Types/Keys/ZarimanQuest/ZarimanQuestKeyChain",
"/Lotus/Types/Keys/KahlQuest/KahlQuestKeyChain",
"/Lotus/Types/Keys/DuviriQuest/DuviriQuestKeyChain",
"/Lotus/Types/Keys/EntratiLab/EntratiQuestKeyChain",
"/Lotus/Types/Keys/JadeShadows/JadeShadowQuestKeyChain"
]