返回提交历史
Modified
static/webui/index.html
+3
-0
Modified
static/webui/script.js
+55
-27
Modified
static/webui/translations/de.js
+2
-1
Modified
static/webui/translations/en.js
+2
-1
Modified
static/webui/translations/es.js
+2
-1
Modified
static/webui/translations/fr.js
+2
-1
Modified
static/webui/translations/ru.js
+2
-1
Modified
static/webui/translations/zh.js
+2
-1
XFEstudio/SpaceNinjaServer
feat(webui): max rank plexus (#2219)
Closes #1740 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2219 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
eadc9c4e
代码差异
8 个文件
+70
-33
@@ -452,6 +452,9 @@
452
452
<button class="btn btn-success" onclick="maxRankAllEquipment(['SentinelWeapons']);" data-loc="inventory_bulkRankUpSentinelWeapons"></button>
453
453
<button class="btn btn-success" onclick="maxRankAllEvolutions();" data-loc="inventory_bulkRankUpEvolutionProgress"></button>
454
454
</div>
455
<div class="mb-2 d-flex flex-wrap gap-2">
456
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
457
</div>
455
458
</div>
456
459
</div>
457
460
</div>
@@ -594,8 +594,9 @@ function updateInventory() {
594
594
a.onclick = function (event) {
595
595
event.preventDefault();
596
596
revalidateAuthz(() => {
597
const promises = [];
597
598
if (item.XP < maxXP) {
598
addGearExp(category, item.ItemId.$oid, maxXP - item.XP);
599
promises.push(addGearExp(category, item.ItemId.$oid, maxXP - item.XP));
599
600
}
600
601
if ("exalted" in itemMap[item.ItemType]) {
601
602
for (const exaltedType of itemMap[item.ItemType].exalted) {
@@ -604,15 +605,20 @@ function updateInventory() {
604
605
const exaltedCap =
605
606
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
606
607
if (exaltedItem.XP < exaltedCap) {
607
addGearExp(
608
"SpecialItems",
609
exaltedItem.ItemId.$oid,
610
exaltedCap - exaltedItem.XP
608
promises.push(
609
addGearExp(
610
"SpecialItems",
611
exaltedItem.ItemId.$oid,
612
exaltedCap - exaltedItem.XP
613
)
611
614
);
612
615
}
613
616
}
614
617
}
615
618
}
619
Promise.all(promises).then(() => {
620
updateInventory();
621
});
616
622
});
617
623
};
618
624
a.title = loc("code_maxRank");
@@ -761,6 +767,13 @@ function updateInventory() {
761
767
giveAllQEvolutionProgress.disabled = true;
762
768
}
763
769
770
if (data.CrewShipHarnesses?.length) {
771
window.plexus = {
772
id: data.CrewShipHarnesses[0].ItemId.$oid,
773
xp: data.CrewShipHarnesses[0].XP
774
};
775
}
776
764
777
// Populate quests route
765
778
document.getElementById("QuestKeys-list").innerHTML = "";
766
779
data.QuestKeys.forEach(item => {
@@ -1443,20 +1456,17 @@ function maxRankAllEquipment(categories) {
1443
1456
XP: maxXP
1444
1457
});
1445
1458
}
1446
if (category === "Suits") {
1447
if ("exalted" in itemMap[item.ItemType]) {
1448
for (const exaltedType of itemMap[item.ItemType].exalted) {
1449
const exaltedItem = data["SpecialItems"].find(x => x.ItemType == exaltedType);
1450
if (exaltedItem) {
1451
const exaltedCap =
1452
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
1453
if (exaltedItem.XP < exaltedCap) {
1454
batchData["SpecialItems"] ??= [];
1455
batchData["SpecialItems"].push({
1456
ItemId: { $oid: exaltedItem.ItemId.$oid },
1457
XP: exaltedCap
1458
});
1459
}
1459
if (item.ItemType in itemMap && "exalted" in itemMap[item.ItemType]) {
1460
for (const exaltedType of itemMap[item.ItemType].exalted) {
1461
const exaltedItem = data["SpecialItems"].find(x => x.ItemType == exaltedType);
1462
if (exaltedItem) {
1463
const exaltedCap = itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
1464
if (exaltedItem.XP < exaltedCap) {
1465
batchData["SpecialItems"] ??= [];
1466
batchData["SpecialItems"].push({
1467
ItemId: { $oid: exaltedItem.ItemId.$oid },
1468
XP: exaltedCap
1469
});
1460
1470
}
1461
1471
}
1462
1472
}
@@ -1483,14 +1493,14 @@ function addGearExp(category, oid, xp) {
1483
1493
XP: xp
1484
1494
}
1485
1495
];
1486
$.post({
1487
url: "/custom/addXp?" + window.authz,
1488
contentType: "application/json",
1489
data: JSON.stringify(data)
1490
}).done(function () {
1491
if (category != "SpecialItems") {
1492
updateInventory();
1493
}
1496
return new Promise((resolve, reject) => {
1497
$.post({
1498
url: "/custom/addXp?" + window.authz,
1499
contentType: "application/json",
1500
data: JSON.stringify(data)
1501
})
1502
.done(resolve)
1503
.fail(reject);
1494
1504
});
1495
1505
}
1496
1506
@@ -2249,3 +2259,21 @@ function formatDatetime(fmt, date) {
2249
2259
}
2250
2260
});
2251
2261
}
2262
2263
const calls_in_flight = new Set();
2264
2265
async function debounce(func, ...args) {
2266
calls_in_flight.add(func);
2267
await func(...args);
2268
calls_in_flight.delete(func);
2269
}
2270
2271
async function doMaxPlexus() {
2272
if ((window.plexus?.xp ?? 0) < 900_000) {
2273
await addGearExp("CrewShipHarnesses", window.plexus.id, 900_000 - window.plexus.xp);
2274
window.plexus.xp = 900_000;
2275
toast(loc("code_succRankUp"));
2276
} else {
2277
toast(loc("code_noEquipmentToRankUp"));
2278
}
2279
}
@@ -86,6 +86,7 @@ dict = {
86
86
inventory_moaPets: `Moas`,
87
87
inventory_kubrowPets: `Bestien`,
88
88
inventory_evolutionProgress: `Incarnon-Entwicklungsfortschritte`,
89
inventory_Boosters: `[UNTRANSLATED] Boosters`,
89
90
inventory_bulkAddSuits: `Fehlende Warframes hinzufügen`,
90
91
inventory_bulkAddWeapons: `Fehlende Waffen hinzufügen`,
91
92
inventory_bulkAddSpaceSuits: `Fehlende Archwings hinzufügen`,
@@ -100,7 +101,7 @@ dict = {
100
101
inventory_bulkRankUpSentinels: `Alle Wächter auf Max. Rang`,
101
102
inventory_bulkRankUpSentinelWeapons: `Alle Wächter-Waffen auf Max. Rang`,
102
103
inventory_bulkRankUpEvolutionProgress: `Alle Incarnon-Entwicklungsfortschritte auf Max. Rang`,
103
inventory_Boosters: `[UNTRANSLATED] Boosters`,
104
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
104
105
105
106
quests_list: `Quests`,
106
107
quests_completeAll: `Alle Quests abschließen`,
@@ -85,6 +85,7 @@ dict = {
85
85
inventory_moaPets: `Moas`,
86
86
inventory_kubrowPets: `Beasts`,
87
87
inventory_evolutionProgress: `Incarnon Evolution Progress`,
88
inventory_Boosters: `Boosters`,
88
89
inventory_bulkAddSuits: `Add Missing Warframes`,
89
90
inventory_bulkAddWeapons: `Add Missing Weapons`,
90
91
inventory_bulkAddSpaceSuits: `Add Missing Archwings`,
@@ -99,7 +100,7 @@ dict = {
99
100
inventory_bulkRankUpSentinels: `Max Rank All Sentinels`,
100
101
inventory_bulkRankUpSentinelWeapons: `Max Rank All Sentinel Weapons`,
101
102
inventory_bulkRankUpEvolutionProgress: `Max Rank All Incarnon Evolution Progress`,
102
inventory_Boosters: `Boosters`,
103
inventory_maxPlexus: `Max Rank Plexus`,
103
104
104
105
quests_list: `Quests`,
105
106
quests_completeAll: `Complete All Quests`,
@@ -86,6 +86,7 @@ dict = {
86
86
inventory_moaPets: `Moas`,
87
87
inventory_kubrowPets: `Bestias`,
88
88
inventory_evolutionProgress: `Progreso de evolución Incarnon`,
89
inventory_Boosters: `Potenciadores`,
89
90
inventory_bulkAddSuits: `Agregar Warframes faltantes`,
90
91
inventory_bulkAddWeapons: `Agregar armas faltantes`,
91
92
inventory_bulkAddSpaceSuits: `Agregar Archwings faltantes`,
@@ -100,7 +101,7 @@ dict = {
100
101
inventory_bulkRankUpSentinels: `Maximizar rango de todos los centinelas`,
101
102
inventory_bulkRankUpSentinelWeapons: `Maximizar rango de todas las armas de centinela`,
102
103
inventory_bulkRankUpEvolutionProgress: `Maximizar todo el progreso de evolución Incarnon`,
103
inventory_Boosters: `Potenciadores`,
104
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
104
105
105
106
quests_list: `Misiones`,
106
107
quests_completeAll: `Completar todas las misiones`,
@@ -86,6 +86,7 @@ dict = {
86
86
inventory_moaPets: `Moas`,
87
87
inventory_kubrowPets: `Bêtes`,
88
88
inventory_evolutionProgress: `Progrès de l'évolution Incarnon`,
89
inventory_Boosters: `[UNTRANSLATED] Boosters`,
89
90
inventory_bulkAddSuits: `Ajouter les Warframes manquantes`,
90
91
inventory_bulkAddWeapons: `Ajouter les armes manquantes`,
91
92
inventory_bulkAddSpaceSuits: `Ajouter les Archwings manquants`,
@@ -100,7 +101,7 @@ dict = {
100
101
inventory_bulkRankUpSentinels: `Toutes les Sentinelles au rang max`,
101
102
inventory_bulkRankUpSentinelWeapons: `Toutes les armes de Sentinelles au rang max`,
102
103
inventory_bulkRankUpEvolutionProgress: `Toutes les évolutions Incarnon au rang max`,
103
inventory_Boosters: `[UNTRANSLATED] Boosters`,
104
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
104
105
105
106
quests_list: `Quêtes`,
106
107
quests_completeAll: `Compléter toutes les quêtes`,
@@ -86,6 +86,7 @@ dict = {
86
86
inventory_moaPets: `МОА`,
87
87
inventory_kubrowPets: `Звери`,
88
88
inventory_evolutionProgress: `Прогресс эволюции Инкарнонов`,
89
inventory_Boosters: `[UNTRANSLATED] Boosters`,
89
90
inventory_bulkAddSuits: `Добавить отсутствующие варфреймы`,
90
91
inventory_bulkAddWeapons: `Добавить отсутствующее оружие`,
91
92
inventory_bulkAddSpaceSuits: `Добавить отсутствующие арчвинги`,
@@ -100,7 +101,7 @@ dict = {
100
101
inventory_bulkRankUpSentinels: `Максимальный ранг всех стражей`,
101
102
inventory_bulkRankUpSentinelWeapons: `Максимальный ранг всего оружия стражей`,
102
103
inventory_bulkRankUpEvolutionProgress: `Максимальный ранг всех эволюций Инкарнонов`,
103
inventory_Boosters: `[UNTRANSLATED] Boosters`,
104
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
104
105
105
106
quests_list: `Квесты`,
106
107
quests_completeAll: `Завершить все квесты`,
@@ -86,6 +86,7 @@ dict = {
86
86
inventory_moaPets: `恐鸟`,
87
87
inventory_kubrowPets: `动物同伴`,
88
88
inventory_evolutionProgress: `灵化之源进度`,
89
inventory_Boosters: `加成器`,
89
90
inventory_bulkAddSuits: `添加缺失战甲`,
90
91
inventory_bulkAddWeapons: `添加缺失武器`,
91
92
inventory_bulkAddSpaceSuits: `添加缺失Archwing`,
@@ -100,7 +101,7 @@ dict = {
100
101
inventory_bulkRankUpSentinels: `所有守护升满级`,
101
102
inventory_bulkRankUpSentinelWeapons: `所有守护武器升满级`,
102
103
inventory_bulkRankUpEvolutionProgress: `所有灵化之源最大等级`,
103
inventory_Boosters: `加成器`,
104
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
104
105
105
106
quests_list: `任务`,
106
107
quests_completeAll: `完成所有任务`,