返回提交历史
Added
src/controllers/custom/addMissingHelminthBlueprintsController.ts
+24
-0
Modified
src/routes/custom.ts
+2
-0
Modified
static/webui/index.html
+1
-0
Modified
static/webui/script.js
+5
-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/zh.js
+1
-0
XFEstudio/SpaceNinjaServer
feat(webui): add missing subsumed abilities (#2287)
Closes #1984 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/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>
8c225559
代码差异
10 个文件
+38
-0
@@ -0,0 +1,24 @@
1
import { getAccountIdForRequest } from "@/src/services/loginService";
2
import { getInventory, addRecipes } from "@/src/services/inventoryService";
3
import { RequestHandler } from "express";
4
import { ExportRecipes } from "warframe-public-export-plus";
5
6
export const addMissingHelminthBlueprintsController: RequestHandler = async (req, res) => {
7
const accountId = await getAccountIdForRequest(req);
8
const inventory = await getInventory(accountId, "Recipes");
9
const allHelminthRecipes = Object.keys(ExportRecipes).filter(
10
key => ExportRecipes[key].secretIngredientAction === "SIA_WARFRAME_ABILITY"
11
);
12
const inventoryHelminthRecipes = inventory.Recipes.filter(recipe =>
13
recipe.ItemType.startsWith("/Lotus/Types/Recipes/AbilityOverrides/")
14
).map(recipe => recipe.ItemType);
15
16
const missingHelminthRecipes = allHelminthRecipes
17
.filter(key => !inventoryHelminthRecipes.includes(key))
18
.map(ItemType => ({ ItemType, ItemCount: 1 }));
19
20
addRecipes(inventory, missingHelminthRecipes);
21
22
await inventory.save();
23
res.end();
24
};
@@ -13,6 +13,7 @@ import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAl
13
13
import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController";
14
14
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
15
15
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
16
import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController";
16
17
17
18
import { createAccountController } from "@/src/controllers/custom/createAccountController";
18
19
import { createMessageController } from "@/src/controllers/custom/createMessageController";
@@ -42,6 +43,7 @@ customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
42
43
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
43
44
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
44
45
customRouter.get("/completeAllMissions", completeAllMissionsController);
46
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
45
47
46
48
customRouter.post("/createAccount", createAccountController);
47
49
customRouter.post("/createMessage", createMessageController);
@@ -794,6 +794,7 @@
794
794
<button class="btn btn-primary" onclick="debounce(doUnlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
795
795
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
796
796
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
797
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
797
798
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
798
799
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
799
800
</div>
@@ -1449,6 +1449,11 @@ function addMissingEquipment(categories) {
1449
1449
}
1450
1450
}
1451
1451
1452
async function addMissingHelminthRecipes() {
1453
await revalidateAuthz();
1454
await fetch("/custom/addMissingHelminthBlueprints?" + window.authz);
1455
}
1456
1452
1457
function addMissingEvolutionProgress() {
1453
1458
const requests = [];
1454
1459
document.querySelectorAll("#datalist-EvolutionProgress option").forEach(elm => {
@@ -181,6 +181,7 @@ dict = {
181
181
cheats_account: `Account`,
182
182
cheats_unlockAllFocusSchools: `Alle Fokus-Schulen freischalten`,
183
183
cheats_helminthUnlockAll: `Helminth vollständig aufleveln`,
184
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
184
185
cheats_intrinsicsUnlockAll: `Alle Inhärenzen auf Max. Rang`,
185
186
cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`,
186
187
cheats_changeButton: `Ändern`,
@@ -180,6 +180,7 @@ dict = {
180
180
cheats_account: `Account`,
181
181
cheats_unlockAllFocusSchools: `Unlock All Focus Schools`,
182
182
cheats_helminthUnlockAll: `Fully Level Up Helminth`,
183
cheats_addMissingSubsumedAbilities: `Add Missing Subsumed Abilities`,
183
184
cheats_intrinsicsUnlockAll: `Max Rank All Intrinsics`,
184
185
cheats_changeSupportedSyndicate: `Supported syndicate`,
185
186
cheats_changeButton: `Change`,
@@ -181,6 +181,7 @@ dict = {
181
181
cheats_account: `Cuenta`,
182
182
cheats_unlockAllFocusSchools: `Desbloquear todas las escuelas de enfoque`,
183
183
cheats_helminthUnlockAll: `Subir al máximo el Helminto`,
184
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
184
185
cheats_intrinsicsUnlockAll: `Maximizar todos los intrínsecos`,
185
186
cheats_changeSupportedSyndicate: `Sindicatos disponibles`,
186
187
cheats_changeButton: `Cambiar`,
@@ -181,6 +181,7 @@ dict = {
181
181
cheats_account: `Compte`,
182
182
cheats_unlockAllFocusSchools: `Débloquer toutes les écoles de focus`,
183
183
cheats_helminthUnlockAll: `Helminth niveau max`,
184
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
184
185
cheats_intrinsicsUnlockAll: `Inhérences niveau max`,
185
186
cheats_changeSupportedSyndicate: `Allégeance`,
186
187
cheats_changeButton: `Changer`,
@@ -181,6 +181,7 @@ dict = {
181
181
cheats_account: `Аккаунт`,
182
182
cheats_unlockAllFocusSchools: `Разблокировать все школы фокуса`,
183
183
cheats_helminthUnlockAll: `Полностью улучшить Гельминта`,
184
cheats_addMissingSubsumedAbilities: `Добавить отсутствующие поглощённые способности`,
184
185
cheats_intrinsicsUnlockAll: `Полностью улучшить Модуляры`,
185
186
cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`,
186
187
cheats_changeButton: `Изменить`,
@@ -181,6 +181,7 @@ dict = {
181
181
cheats_account: `账户`,
182
182
cheats_unlockAllFocusSchools: `解锁所有专精学派`,
183
183
cheats_helminthUnlockAll: `完全升级Helminth`,
184
cheats_addMissingSubsumedAbilities: `[UNTRANSLATED] Add Missing Subsumed Abilities`,
184
185
cheats_intrinsicsUnlockAll: `所有内源之力最大等级`,
185
186
cheats_changeSupportedSyndicate: `支持的集团`,
186
187
cheats_changeButton: `更改`,