feat(webui): Add Missing Helminth Recipes
All checks were successful
Build / build (pull_request) Successful in 1m17s
All checks were successful
Build / build (pull_request) Successful in 1m17s
Closes #1984
This commit is contained in:
parent
285b1bbf60
commit
97d482f5a1
@ -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 { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController";
|
||||||
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
||||||
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
|
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
|
||||||
|
import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController";
|
||||||
|
|
||||||
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
||||||
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
||||||
@ -42,6 +43,7 @@ customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
|
|||||||
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
||||||
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
||||||
customRouter.get("/completeAllMissions", completeAllMissionsController);
|
customRouter.get("/completeAllMissions", completeAllMissionsController);
|
||||||
|
customRouter.get("/addMissingHelminthBlueprintsController", addMissingHelminthBlueprintsController);
|
||||||
|
|
||||||
customRouter.post("/createAccount", createAccountController);
|
customRouter.post("/createAccount", createAccountController);
|
||||||
customRouter.post("/createMessage", createMessageController);
|
customRouter.post("/createMessage", createMessageController);
|
||||||
|
@ -442,6 +442,7 @@
|
|||||||
<button class="btn btn-primary" onclick="addMissingEquipment(['Sentinels']);" data-loc="inventory_bulkAddSentinels"></button>
|
<button class="btn btn-primary" onclick="addMissingEquipment(['Sentinels']);" data-loc="inventory_bulkAddSentinels"></button>
|
||||||
<button class="btn btn-primary" onclick="addMissingEquipment(['SentinelWeapons']);" data-loc="inventory_bulkAddSentinelWeapons"></button>
|
<button class="btn btn-primary" onclick="addMissingEquipment(['SentinelWeapons']);" data-loc="inventory_bulkAddSentinelWeapons"></button>
|
||||||
<button class="btn btn-primary" onclick="addMissingEvolutionProgress();" data-loc="inventory_bulkAddEvolutionProgress"></button>
|
<button class="btn btn-primary" onclick="addMissingEvolutionProgress();" data-loc="inventory_bulkAddEvolutionProgress"></button>
|
||||||
|
<button class="btn btn-primary" onclick="addMissingHelminthRecipes();" data-loc="inventory_bulkAddMissingHelminthRecipes"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 d-flex flex-wrap gap-2">
|
<div class="mb-2 d-flex flex-wrap gap-2">
|
||||||
<button class="btn btn-success" onclick="maxRankAllEquipment(['Suits']);" data-loc="inventory_bulkRankUpSuits"></button>
|
<button class="btn btn-success" onclick="maxRankAllEquipment(['Suits']);" data-loc="inventory_bulkRankUpSuits"></button>
|
||||||
|
@ -1449,6 +1449,12 @@ function addMissingEquipment(categories) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function addMissingHelminthRecipes() {
|
||||||
|
await revalidateAuthz();
|
||||||
|
await fetch("/custom/addMissingHelminthBlueprintsController?" + window.authz);
|
||||||
|
updateInventory();
|
||||||
|
}
|
||||||
|
|
||||||
function addMissingEvolutionProgress() {
|
function addMissingEvolutionProgress() {
|
||||||
const requests = [];
|
const requests = [];
|
||||||
document.querySelectorAll("#datalist-EvolutionProgress option").forEach(elm => {
|
document.querySelectorAll("#datalist-EvolutionProgress option").forEach(elm => {
|
||||||
|
@ -93,6 +93,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `Fehlende Wächter hinzufügen`,
|
inventory_bulkAddSentinels: `Fehlende Wächter hinzufügen`,
|
||||||
inventory_bulkAddSentinelWeapons: `Fehlende Wächter-Waffen hinzufügen`,
|
inventory_bulkAddSentinelWeapons: `Fehlende Wächter-Waffen hinzufügen`,
|
||||||
inventory_bulkAddEvolutionProgress: `Fehlende Incarnon-Entwicklungsfortschritte hinzufügen`,
|
inventory_bulkAddEvolutionProgress: `Fehlende Incarnon-Entwicklungsfortschritte hinzufügen`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `[UNTRANSLATED] Add Missing Helminth Recipes`,
|
||||||
inventory_bulkRankUpSuits: `Alle Warframes auf Max. Rang`,
|
inventory_bulkRankUpSuits: `Alle Warframes auf Max. Rang`,
|
||||||
inventory_bulkRankUpWeapons: `Alle Waffen auf Max. Rang`,
|
inventory_bulkRankUpWeapons: `Alle Waffen auf Max. Rang`,
|
||||||
inventory_bulkRankUpSpaceSuits: `Alle Archwings auf Max. Rang`,
|
inventory_bulkRankUpSpaceSuits: `Alle Archwings auf Max. Rang`,
|
||||||
|
@ -92,6 +92,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `Add Missing Sentinels`,
|
inventory_bulkAddSentinels: `Add Missing Sentinels`,
|
||||||
inventory_bulkAddSentinelWeapons: `Add Missing Sentinel Weapons`,
|
inventory_bulkAddSentinelWeapons: `Add Missing Sentinel Weapons`,
|
||||||
inventory_bulkAddEvolutionProgress: `Add Missing Incarnon Evolution Progress`,
|
inventory_bulkAddEvolutionProgress: `Add Missing Incarnon Evolution Progress`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `Add Missing Helminth Recipes`,
|
||||||
inventory_bulkRankUpSuits: `Max Rank All Warframes`,
|
inventory_bulkRankUpSuits: `Max Rank All Warframes`,
|
||||||
inventory_bulkRankUpWeapons: `Max Rank All Weapons`,
|
inventory_bulkRankUpWeapons: `Max Rank All Weapons`,
|
||||||
inventory_bulkRankUpSpaceSuits: `Max Rank All Archwings`,
|
inventory_bulkRankUpSpaceSuits: `Max Rank All Archwings`,
|
||||||
|
@ -93,6 +93,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `Agregar centinelas faltantes`,
|
inventory_bulkAddSentinels: `Agregar centinelas faltantes`,
|
||||||
inventory_bulkAddSentinelWeapons: `Agregar armas de centinela faltantes`,
|
inventory_bulkAddSentinelWeapons: `Agregar armas de centinela faltantes`,
|
||||||
inventory_bulkAddEvolutionProgress: `Completar el progreso de evolución Incarnon faltante`,
|
inventory_bulkAddEvolutionProgress: `Completar el progreso de evolución Incarnon faltante`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `[UNTRANSLATED] Add Missing Helminth Recipes`,
|
||||||
inventory_bulkRankUpSuits: `Maximizar rango de todos los Warframes`,
|
inventory_bulkRankUpSuits: `Maximizar rango de todos los Warframes`,
|
||||||
inventory_bulkRankUpWeapons: `Maximizar rango de todas las armas`,
|
inventory_bulkRankUpWeapons: `Maximizar rango de todas las armas`,
|
||||||
inventory_bulkRankUpSpaceSuits: `Maximizar rango de todos los Archwings`,
|
inventory_bulkRankUpSpaceSuits: `Maximizar rango de todos los Archwings`,
|
||||||
|
@ -93,6 +93,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `Ajouter les Sentinelles manquantes`,
|
inventory_bulkAddSentinels: `Ajouter les Sentinelles manquantes`,
|
||||||
inventory_bulkAddSentinelWeapons: `Ajouter les armes de Sentinelles manquantes`,
|
inventory_bulkAddSentinelWeapons: `Ajouter les armes de Sentinelles manquantes`,
|
||||||
inventory_bulkAddEvolutionProgress: `Ajouter les évolutions Incarnon manquantes`,
|
inventory_bulkAddEvolutionProgress: `Ajouter les évolutions Incarnon manquantes`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `[UNTRANSLATED] Add Missing Helminth Recipes`,
|
||||||
inventory_bulkRankUpSuits: `Toutes les Warframes au rang max`,
|
inventory_bulkRankUpSuits: `Toutes les Warframes au rang max`,
|
||||||
inventory_bulkRankUpWeapons: `Toutes les armes au rang max`,
|
inventory_bulkRankUpWeapons: `Toutes les armes au rang max`,
|
||||||
inventory_bulkRankUpSpaceSuits: `Tous les Archwings au rang max`,
|
inventory_bulkRankUpSpaceSuits: `Tous les Archwings au rang max`,
|
||||||
|
@ -93,6 +93,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `Добавить отсутствующих стражей`,
|
inventory_bulkAddSentinels: `Добавить отсутствующих стражей`,
|
||||||
inventory_bulkAddSentinelWeapons: `Добавить отсутствующее оружие стражей`,
|
inventory_bulkAddSentinelWeapons: `Добавить отсутствующее оружие стражей`,
|
||||||
inventory_bulkAddEvolutionProgress: `Добавить отсуствующий прогресс эволюции Инкарнонов`,
|
inventory_bulkAddEvolutionProgress: `Добавить отсуствующий прогресс эволюции Инкарнонов`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `Добавить отсутствующее рецепты Гельминта`,
|
||||||
inventory_bulkRankUpSuits: `Максимальный ранг всех варфреймов`,
|
inventory_bulkRankUpSuits: `Максимальный ранг всех варфреймов`,
|
||||||
inventory_bulkRankUpWeapons: `Максимальный ранг всего оружия`,
|
inventory_bulkRankUpWeapons: `Максимальный ранг всего оружия`,
|
||||||
inventory_bulkRankUpSpaceSuits: `Максимальный ранг всех арчвингов`,
|
inventory_bulkRankUpSpaceSuits: `Максимальный ранг всех арчвингов`,
|
||||||
|
@ -93,6 +93,7 @@ dict = {
|
|||||||
inventory_bulkAddSentinels: `添加缺失守护`,
|
inventory_bulkAddSentinels: `添加缺失守护`,
|
||||||
inventory_bulkAddSentinelWeapons: `添加缺失守护武器`,
|
inventory_bulkAddSentinelWeapons: `添加缺失守护武器`,
|
||||||
inventory_bulkAddEvolutionProgress: `添加缺失的灵化之源`,
|
inventory_bulkAddEvolutionProgress: `添加缺失的灵化之源`,
|
||||||
|
inventory_bulkAddMissingHelminthRecipes: `[UNTRANSLATED] Add Missing Helminth Recipes`,
|
||||||
inventory_bulkRankUpSuits: `所有战甲升满级`,
|
inventory_bulkRankUpSuits: `所有战甲升满级`,
|
||||||
inventory_bulkRankUpWeapons: `所有武器升满级`,
|
inventory_bulkRankUpWeapons: `所有武器升满级`,
|
||||||
inventory_bulkRankUpSpaceSuits: `所有Archwing升满级`,
|
inventory_bulkRankUpSpaceSuits: `所有Archwing升满级`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user