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

improve: for "make rank 30", also make respective exalted items rank 30 (#648)

9dbb0fe4
Sainan <sainan@calamity.inc>
提交于

代码差异

2 个文件 +21 -2
Modified src/controllers/custom/getItemListsController.ts +2 -1
@@ -89,7 +89,8 @@ const getItemListsController: RequestHandler = (req, res) => {
89 89 .map(([uniqueName, warframe]) => {
90 90 return {
91 91 uniqueName,
92 name: getString(warframe.name, lang)
92 name: getString(warframe.name, lang),
93 exalted: warframe.exalted
93 94 };
94 95 }),
95 96 weapons,
Modified static/webui/script.js +19 -1
@@ -203,6 +203,22 @@ function updateInventory() {
203 203 a.onclick = function (event) {
204 204 event.preventDefault();
205 205 addGearExp("Suits", item.ItemId.$oid, 1_600_000 - item.XP);
206 if ("exalted" in itemMap[item.ItemType]) {
207 for (const exaltedType of itemMap[item.ItemType].exalted) {
208 const exaltedItem = data.SpecialItems.find(x => x.ItemType == exaltedType);
209 if (exaltedItem) {
210 const exaltedCap =
211 itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
212 if (exaltedItem.XP < exaltedCap) {
213 addGearExp(
214 "SpecialItems",
215 exaltedItem.ItemId.$oid,
216 exaltedCap - exaltedItem.XP
217 );
218 }
219 }
220 }
221 }
206 222 };
207 223 a.title = "Make Rank 30";
208 224 a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
@@ -562,7 +578,9 @@ function addGearExp(category, oid, xp) {
562 578 contentType: "text/plain",
563 579 data: JSON.stringify(data)
564 580 }).done(function () {
565 updateInventory();
581 if (category != "SpecialItems") {
582 updateInventory();
583 }
566 584 });
567 585 });
568 586 }