XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat(webui): Incarnon Genesis installation in detailed view (#3397)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3397 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

ddf98d70
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

10 个文件 +58 -13
Modified src/controllers/custom/equipmentFeaturesController.ts +27 -1
@@ -4,13 +4,15 @@ import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts
4 4 import { getInventory } from "../../services/inventoryService.ts";
5 5 import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
6 6 import { sendWsBroadcastTo } from "../../services/wsService.ts";
7 import allIncarnons from "../../../static/fixed_responses/allIncarnonList.json" with { type: "json" };
8 import { ExportWeapons } from "warframe-public-export-plus";
7 9
8 10 export const equipmentFeaturesController: RequestHandler = async (req, res) => {
9 11 const accountId = await getAccountIdForRequest(req);
10 12 const category = req.query.Category as TEquipmentKey;
11 13 const inventory = await getInventory(
12 14 accountId,
13 `${category} unlockDoubleCapacityPotatoesEverywhere unlockExilusEverywhere unlockArcanesEverywhere`
15 `${category} EvolutionProgress unlockDoubleCapacityPotatoesEverywhere unlockExilusEverywhere unlockArcanesEverywhere`
14 16 );
15 17 const bit = Number(req.query.bit) as EquipmentFeatures;
16 18 if (
@@ -24,6 +26,30 @@ export const equipmentFeaturesController: RequestHandler = async (req, res) => {
24 26 const item = inventory[category].id(req.query.ItemId as string);
25 27 if (item) {
26 28 item.Features ??= 0;
29 if (bit == EquipmentFeatures.INCARNON_GENESIS) {
30 const parentName = ExportWeapons[item.ItemType].parentName;
31 let searchType: string | undefined;
32
33 if (allIncarnons.includes(item.ItemType)) {
34 searchType = item.ItemType;
35 } else if (allIncarnons.includes(parentName)) {
36 searchType = parentName;
37 }
38
39 if (searchType) {
40 item.SkillTree = "0";
41 inventory.EvolutionProgress ??= [];
42 if (!inventory.EvolutionProgress.find(entry => entry.ItemType == searchType)) {
43 inventory.EvolutionProgress.push({
44 Progress: 0,
45 Rank: 1,
46 ItemType: searchType
47 });
48 }
49 } else {
50 res.status(400).end();
51 }
52 }
27 53 item.Features ^= bit;
28 54 await inventory.save();
29 55 sendWsBroadcastTo(accountId, { sync_inventory: true });
Modified src/controllers/custom/getItemListsController.ts +3 -1
@@ -40,6 +40,7 @@ interface ListedItem {
40 40 alwaysAvailable?: boolean;
41 41 maxLevelCap?: number;
42 42 eligibleForVault?: boolean;
43 parentName?: string;
43 44 }
44 45
45 46 interface ItemLists {
@@ -205,7 +206,8 @@ const getItemListsController: RequestHandler = (req, response) => {
205 206 res[item.productCategory].push({
206 207 uniqueName,
207 208 name: getString(item.name, lang),
208 maxLevelCap: item.maxLevelCap
209 maxLevelCap: item.maxLevelCap,
210 parentName: item.parentName
209 211 });
210 212 }
211 213 } else if (!item.excludeFromCodex) {
Modified static/webui/script.js +10 -0
@@ -1563,12 +1563,22 @@ function translateInventoryDataToDom() {
1563 1563 buttonsCard.innerHTML = "";
1564 1564 item.Features ??= 0;
1565 1565 const bits = [];
1566 const evolutionWeapons = Array.from(
1567 document.querySelectorAll("#datalist-EvolutionProgress option")
1568 ).map(option => option.dataset.key);
1569
1566 1570 if (category != "OperatorAmps") bits.push(1);
1567 1571 if (["Suits", "LongGuns", "Pistols", "Melee"].includes(category)) bits.push(2);
1568 1572 if (modularWeapons.includes(item.ItemType)) bits.push(8);
1569 1573 if (["LongGuns", "Pistols", "Melee", "SpaceGuns", "OperatorAmps"].includes(category))
1570 1574 bits.push(32);
1571 1575 if (category == "SpaceGuns") bits.push(4, 64);
1576 if (
1577 [item.ItemType, itemMap[item.ItemType]?.parentName].some(
1578 type => type && evolutionWeapons.includes(type) && !permanentEvolutionWeapons.has(type)
1579 )
1580 )
1581 bits.push(512);
1572 1582 if (
1573 1583 ["LongGuns", "Pistols", "Melee", "SpaceGuns", "SpaceMelee"].includes(category) &&
1574 1584 item.UpgradeFingerprint
Modified static/webui/translations/de.js +1 -0
@@ -93,6 +93,7 @@ dict = {
93 93 code_feature_8: `Veredelt`,
94 94 code_feature_32: `Arkana Slot`,
95 95 code_feature_64: `Zweiter Arkana Slot`,
96 code_feature_512: `Incarnon-Genesis`,
96 97 code_feature_1024: `Valenz-Überbrückung`,
97 98 login_description: `Melde dich mit deinem OpenWF-Account an (denselben Angaben wie im Spiel, wenn du dich mit diesem Server verbindest).`,
98 99 login_emailLabel: `E-Mail-Adresse`,
Modified static/webui/translations/en.js +1 -0
@@ -92,6 +92,7 @@ dict = {
92 92 code_feature_8: `Gild`,
93 93 code_feature_32: `Arcane Slot`,
94 94 code_feature_64: `Second Arcane Slot`,
95 code_feature_512: `Incarnon Genesis`,
95 96 code_feature_1024: `Valence Override`,
96 97 login_description: `Login using your OpenWF account credentials (same as in-game when connecting to this server).`,
97 98 login_emailLabel: `Email address`,
Modified static/webui/translations/es.js +7 -6
@@ -86,14 +86,15 @@ dict = {
86 86 code_reviveBoosterDesc: `[UNTRANSLATED] Sets revive count to 4, which allows self-revive in Archon Hunts.`,
87 87 code_succChange: `Cambiado correctamente`,
88 88 code_requiredInvigorationUpgrade: `Debes seleccionar una mejora ofensiva y una mejora de utilidad.`,
89 code_feature_1: `[UNTRANSLATED] Orokin Reactor`,
90 code_feature_1_alt: `[UNTRANSLATED] Orokin Catalyst`,
91 code_feature_2: `[UNTRANSLATED] Exilus Adapter`,
92 code_feature_4: `[UNTRANSLATED] Gravimag`,
93 code_feature_8: `[UNTRANSLATED] Gild`,
89 code_feature_1: `Reactor orokin`,
90 code_feature_1_alt: `Catalizador orokin`,
91 code_feature_2: `Adaptador Exilus`,
92 code_feature_4: `Gravimag`,
93 code_feature_8: `Templar`,
94 94 code_feature_32: `[UNTRANSLATED] Arcane Slot`,
95 95 code_feature_64: `[UNTRANSLATED] Second Arcane Slot`,
96 code_feature_1024: `[UNTRANSLATED] Valence Override`,
96 code_feature_512: `Génesis Incarnon`,
97 code_feature_1024: `Anulación de valencia`,
97 98 login_description: `Inicia sesión con las credenciales de tu cuenta OpenWF (las mismas que usas en el juego al conectarte a este servidor).`,
98 99 login_emailLabel: `Dirección de correo electrónico`,
99 100 login_passwordLabel: `Contraseña`,
Modified static/webui/translations/fr.js +1 -0
@@ -93,6 +93,7 @@ dict = {
93 93 code_feature_8: `Polir`,
94 94 code_feature_32: `Emplacement d'Arcane pour les Armes Principales`,
95 95 code_feature_64: `Emplacement d'Arcane pour les Armes Secondaire`,
96 code_feature_512: `Genesis Incarnon`,
96 97 code_feature_1024: `Fusion de Valence`,
97 98 login_description: `Connexion avec les informations de connexion OpenWF.`,
98 99 login_emailLabel: `Email`,
Modified static/webui/translations/ru.js +1 -0
@@ -93,6 +93,7 @@ dict = {
93 93 code_feature_8: `Улучшение`,
94 94 code_feature_32: `Слот Мистификатора`,
95 95 code_feature_64: `Второй слот Мистификатора`,
96 code_feature_512: `Генезис Инкарнона`,
96 97 code_feature_1024: `Переопределение валентности`,
97 98 login_description: `Войдите, используя учетные данные OpenWF (те же, что и в игре при подключении к этому серверу).`,
98 99 login_emailLabel: `Адрес электронной почты`,
Modified static/webui/translations/uk.js +1 -0
@@ -93,6 +93,7 @@ dict = {
93 93 code_feature_8: `Позолота`,
94 94 code_feature_32: `Комірка містифікатора`,
95 95 code_feature_64: `Друга комірка містифікатора`,
96 code_feature_512: `Інкарнонський генезис`,
96 97 code_feature_1024: `Валентна перевага`,
97 98 login_description: `Увійдіть, використовуючи облікові дані OpenWF (ті ж, що й у грі при підключенні до цього серверу).`,
98 99 login_emailLabel: `Адреса електронної пошти`,
Modified static/webui/translations/zh.js +6 -5
@@ -86,14 +86,15 @@ dict = {
86 86 code_reviveBoosterDesc: `[UNTRANSLATED] Sets revive count to 4, which allows self-revive in Archon Hunts.`,
87 87 code_succChange: `更改成功`,
88 88 code_requiredInvigorationUpgrade: `[UNTRANSLATED] You must select both an offensive & utility upgrade.`,
89 code_feature_1: `[UNTRANSLATED] Orokin Reactor`,
90 code_feature_1_alt: `[UNTRANSLATED] Orokin Catalyst`,
89 code_feature_1: `奥罗金反应堆`,
90 code_feature_1_alt: `奥罗金催化剂`,
91 91 code_feature_2: `[UNTRANSLATED] Exilus Adapter`,
92 code_feature_4: `[UNTRANSLATED] Gravimag`,
93 code_feature_8: `[UNTRANSLATED] Gild`,
92 code_feature_4: `重力磁抵器`,
93 code_feature_8: `镀金`,
94 94 code_feature_32: `[UNTRANSLATED] Arcane Slot`,
95 95 code_feature_64: `[UNTRANSLATED] Second Arcane Slot`,
96 code_feature_1024: `[UNTRANSLATED] Valence Override`,
96 code_feature_512: `灵化之源`,
97 code_feature_1024: `效价覆写`,
97 98 login_description: `使用您的 OpenWF 账户凭证登录(与游戏内连接本服务器时使用的昵称相同)`,
98 99 login_emailLabel: `电子邮箱`,
99 100 login_passwordLabel: `密码`,