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): Add Missing Simulacrum Scenes cheat (#3451)

Closes #3202 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3451 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>

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

代码差异

10 个文件 +47 -6
Modified src/controllers/custom/getItemListsController.ts +13 -6
@@ -197,7 +197,8 @@ const getItemListsController: RequestHandler = (req, response) => {
197 197 if (uniqueName.split("/")[5] != "SentTrainingAmplifier") {
198 198 res.miscitems.push({
199 199 uniqueName: uniqueName,
200 name: getString(item.name, lang)
200 name: getString(item.name, lang),
201 parentName: item.parentName
201 202 });
202 203 }
203 204 }
@@ -221,7 +222,8 @@ const getItemListsController: RequestHandler = (req, response) => {
221 222 } else if (!item.excludeFromCodex) {
222 223 res.miscitems.push({
223 224 uniqueName: uniqueName,
224 name: getString(item.name, lang)
225 name: getString(item.name, lang),
226 parentName: item.parentName
225 227 });
226 228 }
227 229 }
@@ -256,7 +258,8 @@ const getItemListsController: RequestHandler = (req, response) => {
256 258 if (item.productCategory == "ShipDecorations") {
257 259 res.ShipDecorations.push({
258 260 uniqueName: uniqueName,
259 name: name
261 name: name,
262 parentName: item.parentName
260 263 });
261 264 } else if (
262 265 name &&
@@ -267,6 +270,7 @@ const getItemListsController: RequestHandler = (req, response) => {
267 270 uniqueName: uniqueName,
268 271 name: name,
269 272 subtype: "Resource",
273 parentName: item.parentName,
270 274 ...(eligibleForVault.has(uniqueName) && { eligibleForVault: true })
271 275 });
272 276 }
@@ -291,7 +295,8 @@ const getItemListsController: RequestHandler = (req, response) => {
291 295 res.miscitems.push({
292 296 uniqueName: uniqueName,
293 297 name: getString(item.name, lang),
294 subtype: "Gear"
298 subtype: "Gear",
299 parentName: item.parentName
295 300 });
296 301 }
297 302 const recipeNameTemplate = getString("/Lotus/Language/Items/BlueprintAndItem", lang);
@@ -317,7 +322,8 @@ const getItemListsController: RequestHandler = (req, response) => {
317 322 for (const [uniqueName, item] of Object.entries(ExportRailjackWeapons)) {
318 323 res.miscitems.push({
319 324 uniqueName: uniqueName,
320 name: getString(item.name, lang)
325 name: getString(item.name, lang),
326 parentName: item.parentName
321 327 });
322 328 }
323 329 for (const [uniqueName, item] of Object.entries(ExportCustoms)) {
@@ -442,7 +448,8 @@ const getItemListsController: RequestHandler = (req, response) => {
442 448 } else if (key.name) {
443 449 res.miscitems.push({
444 450 uniqueName,
445 name: getString(key.name, lang)
451 name: getString(key.name, lang),
452 parentName: key.parentName
446 453 });
447 454 }
448 455 }
Modified static/webui/index.html +1 -0
@@ -1197,6 +1197,7 @@
1197 1197 <button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="cheats_maxPlexus"></button>
1198 1198 <button class="btn btn-primary" onclick="debounce(unlockAllJobChainBounties);" data-loc="cheats_unlockAllJobChainBounties"></button>
1199 1199 <button class="btn btn-primary" onclick="debounce(unlockAllSimarisResearchEntries);" data-loc="cheats_unlockAllSimarisResearchEntries"></button>
1200 <button class="btn btn-primary" onclick="debounce(addMissingDangerRooms);" data-loc="cheats_addMissingDangerRooms"></button>
1200 1201 </div>
1201 1202 </div>
1202 1203 </div>
Modified static/webui/script.js +26 -0
@@ -2605,6 +2605,32 @@ function addMissingEquipment(categories) {
2605 2605 }
2606 2606 }
2607 2607
2608 function addMissingDangerRooms() {
2609 revalidateAuthz().then(() => {
2610 getInventoryData().then(data => {
2611 const requests = [];
2612 window.itemListPromise.then(itemMap => {
2613 const allItemKeys = Object.entries(itemMap)
2614 .filter(([_key, item]) => item.parentName === "/Lotus/Types/Items/DangerRoom/DangerRoomTile")
2615 .map(([key]) => key);
2616 const existingItems = new Set(
2617 data.MiscItems.filter(item => item.ItemCount > 0).map(item => item.ItemType)
2618 );
2619 allItemKeys.forEach(item => {
2620 if (!existingItems.has(item)) {
2621 requests.push({ ItemType: item, ItemCount: 1 });
2622 }
2623 });
2624 if (requests.length == 0) {
2625 toast(loc("code_nothingToDo"));
2626 } else if (window.confirm(loc("code_addItemsConfirm").split("|COUNT|").join(requests.length))) {
2627 return dispatchAddItemsRequestsBatch(requests);
2628 }
2629 });
2630 });
2631 });
2632 }
2633
2608 2634 function addVaultItem(vaultType) {
2609 2635 const ItemType = getKey(document.getElementById(`acquire-type-${vaultType}`));
2610 2636 if (!ItemType) {
Modified static/webui/translations/de.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `Makellose Relikte geben immer Silber-Belohnung`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `Strahlende Relikte geben immer Gold-Belohnung`,
278 278 cheats_unlockAllSimarisResearchEntries: `Alle Simaris-Forschungseinträge freischalten`,
279 cheats_addMissingDangerRooms: `[UNTRANSLATED] Add Missing Simulacrum Scenes`,
279 280 cheats_disableDailyTribute: `Täglicher Tribut deaktivieren`,
280 281 cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
281 282 cheats_relicRewardItemCountMultiplier: `Belohnungsmultiplikator für Relikte`,
Modified static/webui/translations/en.js +1 -0
@@ -275,6 +275,7 @@ dict = {
275 275 cheats_flawlessRelicsAlwaysGiveSilverReward: `Flawless Relics Always Give Silver Reward`,
276 276 cheats_radiantRelicsAlwaysGiveGoldReward: `Radiant Relics Always Give Gold Reward`,
277 277 cheats_unlockAllSimarisResearchEntries: `Unlock All Simaris Research Entries`,
278 cheats_addMissingDangerRooms: `Add Missing Simulacrum Scenes`,
278 279 cheats_disableDailyTribute: `Disable Daily Tribute`,
279 280 cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
280 281 cheats_relicRewardItemCountMultiplier: `Relic Reward Item Count Multiplier`,
Modified static/webui/translations/es.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `Las reliquias impecables siempre otorgan recompensa de plata`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `Las reliquias radiantes siempre otorgan recompensa de oro`,
278 278 cheats_unlockAllSimarisResearchEntries: `Desbloquear todas las entradas de investigación de Simaris`,
279 cheats_addMissingDangerRooms: `[UNTRANSLATED] Add Missing Simulacrum Scenes`,
279 280 cheats_disableDailyTribute: `Desactivar tributo diario`,
280 281 cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
281 282 cheats_relicRewardItemCountMultiplier: `Multiplicador de cantidad de recompensas de reliquia`,
Modified static/webui/translations/fr.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `Les reliques parfaites donnent toujours une récompense en argent`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `Les reliques éclatantes donnent toujours une récompense en or`,
278 278 cheats_unlockAllSimarisResearchEntries: `Débloquer toute les recherches chez Simaris`,
279 cheats_addMissingDangerRooms: `[UNTRANSLATED] Add Missing Simulacrum Scenes`,
279 280 cheats_disableDailyTribute: `Désactiver la récompense quotidienne de connexion`,
280 281 cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
281 282 cheats_relicRewardItemCountMultiplier: `Multiplicateur de récompenses de relique`,
Modified static/webui/translations/ru.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `Бесподобные реликвии всегда дают серебряную награду`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `Сияющие реликвии всегда дают золотую награду`,
278 278 cheats_unlockAllSimarisResearchEntries: `Разблокировать все записи исследований Симэриса`,
279 cheats_addMissingDangerRooms: `Добавить отсутвующие сцены Симулякрума`,
279 280 cheats_disableDailyTribute: `Отключить ежедневные награды`,
280 281 cheats_spoofMasteryRank: `Поддельный ранг мастерства (-1 для отключения)`,
281 282 cheats_relicRewardItemCountMultiplier: `Мультипликатор количества предметов награды реликвии`,
Modified static/webui/translations/uk.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `Бездоганні реліквії завжди дають срібну нагороду`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `Сяйнисті реліквії завжди дають золоту нагороду`,
278 278 cheats_unlockAllSimarisResearchEntries: `Розблокувати всі записи досліджень Симаріса`,
279 cheats_addMissingDangerRooms: `[UNTRANSLATED] Add Missing Simulacrum Scenes`,
279 280 cheats_disableDailyTribute: `Вимкнути щоденні нагороди`,
280 281 cheats_spoofMasteryRank: `Підроблений ранг майстерності (-1 для вимкнення)`,
281 282 cheats_relicRewardItemCountMultiplier: `Множник кількості предметів нагороди реліквії`,
Modified static/webui/translations/zh.js +1 -0
@@ -276,6 +276,7 @@ dict = {
276 276 cheats_flawlessRelicsAlwaysGiveSilverReward: `无瑕遗物必定掉落白银奖励`,
277 277 cheats_radiantRelicsAlwaysGiveGoldReward: `光辉遗物必定掉落黄金奖励`,
278 278 cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`,
279 cheats_addMissingDangerRooms: `[UNTRANSLATED] Add Missing Simulacrum Scenes`,
279 280 cheats_disableDailyTribute: `禁用每日登录奖励`,
280 281 cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
281 282 cheats_relicRewardItemCountMultiplier: `虚空遗物奖励物品数量倍率`,