feat(webui): add missing subsumed abilities (#2287)
Closes #1984 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Reviewed-on: #2287 Reviewed-by: Sainan <sainan@calamity.inc> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
This commit is contained in:
parent
c9edef39f8
commit
8c22555904
@ -0,0 +1,24 @@
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { getInventory, addRecipes } from "@/src/services/inventoryService";
|
||||
import { RequestHandler } from "express";
|
||||
import { ExportRecipes } from "warframe-public-export-plus";
|
||||
|
||||
export const addMissingHelminthBlueprintsController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "Recipes");
|
||||
const allHelminthRecipes = Object.keys(ExportRecipes).filter(
|
||||
key => ExportRecipes[key].secretIngredientAction === "SIA_WARFRAME_ABILITY"
|
||||
);
|
||||
const inventoryHelminthRecipes = inventory.Recipes.filter(recipe =>
|
||||
recipe.ItemType.startsWith("/Lotus/Types/Recipes/AbilityOverrides/")
|
||||
).map(recipe => recipe.ItemType);
|
||||
|
||||
const missingHelminthRecipes = allHelminthRecipes
|
||||
.filter(key => !inventoryHelminthRecipes.includes(key))
|
||||
.map(ItemType => ({ ItemType, ItemCount: 1 }));
|
||||
|
||||
addRecipes(inventory, missingHelminthRecipes);
|
||||
|
||||
await inventory.save();
|
||||
res.end();
|
||||
};
|
@ -13,6 +13,7 @@ import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAl
|
||||
import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController";
|
||||
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
||||
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
|
||||
import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController";
|
||||
|
||||
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
||||
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
||||
@ -42,6 +43,7 @@ customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
|
||||
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
||||
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
||||
customRouter.get("/completeAllMissions", completeAllMissionsController);
|
||||
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
|
||||
|
||||
customRouter.post("/createAccount", createAccountController);
|
||||
customRouter.post("/createMessage", createMessageController);
|
||||
|
@ -794,6 +794,7 @@
|
||||
<button class="btn btn-primary" onclick="debounce(doUnlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
|
||||
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
|
||||
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
|
||||
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
|
||||
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
|
||||
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
|
||||
</div>
|
||||
|
@ -1449,6 +1449,11 @@ function addMissingEquipment(categories) {
|
||||
}
|
||||
}
|
||||
|
||||
async function addMissingHelminthRecipes() {
|
||||
await revalidateAuthz();
|
||||
await fetch("/custom/addMissingHelminthBlueprints?" + window.authz);
|
||||
}
|
||||
|
||||
function addMissingEvolutionProgress() {
|
||||
const requests = [];
|
||||
document.querySelectorAll("#datalist-EvolutionProgress option").forEach(elm => {
|
||||
|
@ -181,6 +181,7 @@ dict = {
|
||||
cheats_account: `Account`,
|
||||
cheats_unlockAllFocusSchools: `Alle Fokus-Schulen freischalten`,
|
||||
cheats_helminthUnlockAll: `Helminth vollständig aufleveln`,
|
||||
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
|
||||
cheats_intrinsicsUnlockAll: `Alle Inhärenzen auf Max. Rang`,
|
||||
cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`,
|
||||
cheats_changeButton: `Ändern`,
|
||||
|
@ -180,6 +180,7 @@ dict = {
|
||||
cheats_account: `Account`,
|
||||
cheats_unlockAllFocusSchools: `Unlock All Focus Schools`,
|
||||
cheats_helminthUnlockAll: `Fully Level Up Helminth`,
|
||||
cheats_addMissingSubsumedAbilities: `Add Missing Subsumed Abilities`,
|
||||
cheats_intrinsicsUnlockAll: `Max Rank All Intrinsics`,
|
||||
cheats_changeSupportedSyndicate: `Supported syndicate`,
|
||||
cheats_changeButton: `Change`,
|
||||
|
@ -181,6 +181,7 @@ dict = {
|
||||
cheats_account: `Cuenta`,
|
||||
cheats_unlockAllFocusSchools: `Desbloquear todas las escuelas de enfoque`,
|
||||
cheats_helminthUnlockAll: `Subir al máximo el Helminto`,
|
||||
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
|
||||
cheats_intrinsicsUnlockAll: `Maximizar todos los intrínsecos`,
|
||||
cheats_changeSupportedSyndicate: `Sindicatos disponibles`,
|
||||
cheats_changeButton: `Cambiar`,
|
||||
|
@ -181,6 +181,7 @@ dict = {
|
||||
cheats_account: `Compte`,
|
||||
cheats_unlockAllFocusSchools: `Débloquer toutes les écoles de focus`,
|
||||
cheats_helminthUnlockAll: `Helminth niveau max`,
|
||||
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
|
||||
cheats_intrinsicsUnlockAll: `Inhérences niveau max`,
|
||||
cheats_changeSupportedSyndicate: `Allégeance`,
|
||||
cheats_changeButton: `Changer`,
|
||||
|
@ -181,6 +181,7 @@ dict = {
|
||||
cheats_account: `Аккаунт`,
|
||||
cheats_unlockAllFocusSchools: `Разблокировать все школы фокуса`,
|
||||
cheats_helminthUnlockAll: `Полностью улучшить Гельминта`,
|
||||
cheats_addMissingSubsumedAbilities: `Добавить отсутствующие поглощённые способности`,
|
||||
cheats_intrinsicsUnlockAll: `Полностью улучшить Модуляры`,
|
||||
cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`,
|
||||
cheats_changeButton: `Изменить`,
|
||||
|
@ -181,6 +181,7 @@ dict = {
|
||||
cheats_account: `账户`,
|
||||
cheats_unlockAllFocusSchools: `解锁所有专精学派`,
|
||||
cheats_helminthUnlockAll: `完全升级Helminth`,
|
||||
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
|
||||
cheats_intrinsicsUnlockAll: `所有内源之力最大等级`,
|
||||
cheats_changeSupportedSyndicate: `支持的集团`,
|
||||
cheats_changeButton: `更改`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user