diff --git a/config.json.example b/config.json.example index 8d634d8ff..c3a7eddd6 100644 --- a/config.json.example +++ b/config.json.example @@ -14,6 +14,7 @@ "unlockAllScans": true, "unlockAllMissions": true, "unlockAllQuests": true, + "completeAllQuests": false, "infiniteResources": true, "unlockallShipFeatures": true, "unlockAllShipDecorations": true, diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index a2fed5332..e78bf3d89 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -50,7 +50,19 @@ const inventoryController: RequestHandler = async (request: Request, response: R inventoryResponse.NodeIntrosCompleted.push("TeshinHardModeUnlocked"); } - if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys; + if (config.unlockAllQuests) { + for (const questKey of allQuestKeys) { + if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == questKey)) { + inventoryResponse.QuestKeys.push({ ItemType: questKey }); + } + } + } + if (config.completeAllQuests) { + for (const quest of inventoryResponse.QuestKeys) { + quest.Completed = true; + } + } + if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations; if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[]; diff --git a/src/services/configService.ts b/src/services/configService.ts index b7922349e..b70e24df1 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -12,6 +12,7 @@ interface IConfig { unlockAllScans?: boolean; unlockAllMissions?: boolean; unlockAllQuests?: boolean; + completeAllQuests?: boolean; infiniteResources?: boolean; unlockallShipFeatures?: boolean; unlockAllShipDecorations?: boolean; diff --git a/static/fixed_responses/allQuestKeys.json b/static/fixed_responses/allQuestKeys.json index 61520bebc..370197b9d 100644 --- a/static/fixed_responses/allQuestKeys.json +++ b/static/fixed_responses/allQuestKeys.json @@ -1,38 +1,38 @@ [ - { "ItemType": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/GlassQuest/GlassQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/SolarisQuest/SolarisQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/InfestedIntroQuest/InfestedIntroQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/KubrowQuest/KubrowQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/ArchwingQuest/ArchwingQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/GetClemQuest/GetClemQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/SpyQuestKeyChain/SpyQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/DragonQuest/DragonQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/LimboQuest/LimboQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/SentientQuest/SentientQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/MirageQuest/MirageQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/WarWithinQuest/WarWithinQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/InfestedAladVQuest/InfestedAladVQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/GolemQuest/GolemQuestKeyChainItem" }, - { "ItemType": "/Lotus/Types/Keys/BardQuest/BardQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/FairyQuest/FairyQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/IndexQuest/IndexQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/PriestFrameQuest/PriestQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/ApostasyQuest/ApostasyKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/SacrificeQuest/SacrificeQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/ChimeraQuest/ChimeraKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/MummyQuest/MummyQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/RailJackBuildQuest/RailjackBuildQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/NewWarIntroQuest/NewWarIntroKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/ProteaQuest/ProteaQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/RevenantQuest/RevenantQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/WraithQuest/WraithQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/YareliQuest/YareliQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/ZarimanQuest/ZarimanQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/KahlQuest/KahlQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/DuviriQuest/DuviriQuestKeyChain" }, - { "ItemType": "/Lotus/Types/Keys/EntratiLab/EntratiQuestKeyChain" } + "/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" ]