feat(webui): max rank plexus #2219
@ -452,6 +452,9 @@
|
|||||||
<button class="btn btn-success" onclick="maxRankAllEquipment(['SentinelWeapons']);" data-loc="inventory_bulkRankUpSentinelWeapons"></button>
|
<button class="btn btn-success" onclick="maxRankAllEquipment(['SentinelWeapons']);" data-loc="inventory_bulkRankUpSentinelWeapons"></button>
|
||||||
<button class="btn btn-success" onclick="maxRankAllEvolutions();" data-loc="inventory_bulkRankUpEvolutionProgress"></button>
|
<button class="btn btn-success" onclick="maxRankAllEvolutions();" data-loc="inventory_bulkRankUpEvolutionProgress"></button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-2 d-flex flex-wrap gap-2">
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -594,8 +594,9 @@ function updateInventory() {
|
|||||||
a.onclick = function (event) {
|
a.onclick = function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz(() => {
|
||||||
|
const promises = [];
|
||||||
if (item.XP < maxXP) {
|
if (item.XP < maxXP) {
|
||||||
addGearExp(category, item.ItemId.$oid, maxXP - item.XP);
|
promises.push(addGearExp(category, item.ItemId.$oid, maxXP - item.XP));
|
||||||
}
|
}
|
||||||
if ("exalted" in itemMap[item.ItemType]) {
|
if ("exalted" in itemMap[item.ItemType]) {
|
||||||
for (const exaltedType of itemMap[item.ItemType].exalted) {
|
for (const exaltedType of itemMap[item.ItemType].exalted) {
|
||||||
@ -604,15 +605,20 @@ function updateInventory() {
|
|||||||
const exaltedCap =
|
const exaltedCap =
|
||||||
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
|
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
|
||||||
if (exaltedItem.XP < exaltedCap) {
|
if (exaltedItem.XP < exaltedCap) {
|
||||||
addGearExp(
|
promises.push(
|
||||||
"SpecialItems",
|
addGearExp(
|
||||||
exaltedItem.ItemId.$oid,
|
"SpecialItems",
|
||||||
exaltedCap - exaltedItem.XP
|
exaltedItem.ItemId.$oid,
|
||||||
|
exaltedCap - exaltedItem.XP
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Promise.all(promises).then(() => {
|
||||||
|
updateInventory();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
a.title = loc("code_maxRank");
|
a.title = loc("code_maxRank");
|
||||||
@ -761,6 +767,13 @@ function updateInventory() {
|
|||||||
giveAllQEvolutionProgress.disabled = true;
|
giveAllQEvolutionProgress.disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.CrewShipHarnesses?.length) {
|
||||||
|
window.plexus = {
|
||||||
|
id: data.CrewShipHarnesses[0].ItemId.$oid,
|
||||||
|
xp: data.CrewShipHarnesses[0].XP
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Populate quests route
|
// Populate quests route
|
||||||
document.getElementById("QuestKeys-list").innerHTML = "";
|
document.getElementById("QuestKeys-list").innerHTML = "";
|
||||||
data.QuestKeys.forEach(item => {
|
data.QuestKeys.forEach(item => {
|
||||||
@ -1443,20 +1456,17 @@ function maxRankAllEquipment(categories) {
|
|||||||
XP: maxXP
|
XP: maxXP
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (category === "Suits") {
|
if (item.ItemType in itemMap && "exalted" in itemMap[item.ItemType]) {
|
||||||
if ("exalted" in itemMap[item.ItemType]) {
|
for (const exaltedType of itemMap[item.ItemType].exalted) {
|
||||||
for (const exaltedType of itemMap[item.ItemType].exalted) {
|
const exaltedItem = data["SpecialItems"].find(x => x.ItemType == exaltedType);
|
||||||
const exaltedItem = data["SpecialItems"].find(x => x.ItemType == exaltedType);
|
if (exaltedItem) {
|
||||||
if (exaltedItem) {
|
const exaltedCap = itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
|
||||||
const exaltedCap =
|
if (exaltedItem.XP < exaltedCap) {
|
||||||
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
|
batchData["SpecialItems"] ??= [];
|
||||||
if (exaltedItem.XP < exaltedCap) {
|
batchData["SpecialItems"].push({
|
||||||
batchData["SpecialItems"] ??= [];
|
ItemId: { $oid: exaltedItem.ItemId.$oid },
|
||||||
batchData["SpecialItems"].push({
|
XP: exaltedCap
|
||||||
ItemId: { $oid: exaltedItem.ItemId.$oid },
|
});
|
||||||
XP: exaltedCap
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1483,14 +1493,14 @@ function addGearExp(category, oid, xp) {
|
|||||||
XP: xp
|
XP: xp
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
$.post({
|
return new Promise((resolve, reject) => {
|
||||||
url: "/custom/addXp?" + window.authz,
|
$.post({
|
||||||
contentType: "application/json",
|
url: "/custom/addXp?" + window.authz,
|
||||||
data: JSON.stringify(data)
|
contentType: "application/json",
|
||||||
}).done(function () {
|
data: JSON.stringify(data)
|
||||||
if (category != "SpecialItems") {
|
})
|
||||||
updateInventory();
|
.done(resolve)
|
||||||
}
|
.fail(reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2249,3 +2259,21 @@ function formatDatetime(fmt, date) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const calls_in_flight = new Set();
|
||||||
|
|
||||||
|
async function debounce(func, ...args) {
|
||||||
|
calls_in_flight.add(func);
|
||||||
|
await func(...args);
|
||||||
|
calls_in_flight.delete(func);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doMaxPlexus() {
|
||||||
|
if ((window.plexus?.xp ?? 0) < 900_000) {
|
||||||
|
await addGearExp("CrewShipHarnesses", window.plexus.id, 900_000 - window.plexus.xp);
|
||||||
|
window.plexus.xp = 900_000;
|
||||||
|
toast(loc("code_succRankUp"));
|
||||||
|
} else {
|
||||||
|
toast(loc("code_noEquipmentToRankUp"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -86,6 +86,7 @@ dict = {
|
|||||||
inventory_moaPets: `Moas`,
|
inventory_moaPets: `Moas`,
|
||||||
inventory_kubrowPets: `Bestien`,
|
inventory_kubrowPets: `Bestien`,
|
||||||
inventory_evolutionProgress: `Incarnon-Entwicklungsfortschritte`,
|
inventory_evolutionProgress: `Incarnon-Entwicklungsfortschritte`,
|
||||||
|
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
||||||
inventory_bulkAddSuits: `Fehlende Warframes hinzufügen`,
|
inventory_bulkAddSuits: `Fehlende Warframes hinzufügen`,
|
||||||
inventory_bulkAddWeapons: `Fehlende Waffen hinzufügen`,
|
inventory_bulkAddWeapons: `Fehlende Waffen hinzufügen`,
|
||||||
inventory_bulkAddSpaceSuits: `Fehlende Archwings hinzufügen`,
|
inventory_bulkAddSpaceSuits: `Fehlende Archwings hinzufügen`,
|
||||||
@ -100,7 +101,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `Alle Wächter auf Max. Rang`,
|
inventory_bulkRankUpSentinels: `Alle Wächter auf Max. Rang`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `Alle Wächter-Waffen auf Max. Rang`,
|
inventory_bulkRankUpSentinelWeapons: `Alle Wächter-Waffen auf Max. Rang`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `Alle Incarnon-Entwicklungsfortschritte auf Max. Rang`,
|
inventory_bulkRankUpEvolutionProgress: `Alle Incarnon-Entwicklungsfortschritte auf Max. Rang`,
|
||||||
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `Quests`,
|
quests_list: `Quests`,
|
||||||
quests_completeAll: `Alle Quests abschließen`,
|
quests_completeAll: `Alle Quests abschließen`,
|
||||||
|
@ -85,6 +85,7 @@ dict = {
|
|||||||
inventory_moaPets: `Moas`,
|
inventory_moaPets: `Moas`,
|
||||||
inventory_kubrowPets: `Beasts`,
|
inventory_kubrowPets: `Beasts`,
|
||||||
inventory_evolutionProgress: `Incarnon Evolution Progress`,
|
inventory_evolutionProgress: `Incarnon Evolution Progress`,
|
||||||
|
inventory_Boosters: `Boosters`,
|
||||||
inventory_bulkAddSuits: `Add Missing Warframes`,
|
inventory_bulkAddSuits: `Add Missing Warframes`,
|
||||||
inventory_bulkAddWeapons: `Add Missing Weapons`,
|
inventory_bulkAddWeapons: `Add Missing Weapons`,
|
||||||
inventory_bulkAddSpaceSuits: `Add Missing Archwings`,
|
inventory_bulkAddSpaceSuits: `Add Missing Archwings`,
|
||||||
@ -99,7 +100,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `Max Rank All Sentinels`,
|
inventory_bulkRankUpSentinels: `Max Rank All Sentinels`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `Max Rank All Sentinel Weapons`,
|
inventory_bulkRankUpSentinelWeapons: `Max Rank All Sentinel Weapons`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `Max Rank All Incarnon Evolution Progress`,
|
inventory_bulkRankUpEvolutionProgress: `Max Rank All Incarnon Evolution Progress`,
|
||||||
inventory_Boosters: `Boosters`,
|
inventory_maxPlexus: `Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `Quests`,
|
quests_list: `Quests`,
|
||||||
quests_completeAll: `Complete All Quests`,
|
quests_completeAll: `Complete All Quests`,
|
||||||
|
@ -86,6 +86,7 @@ dict = {
|
|||||||
inventory_moaPets: `Moas`,
|
inventory_moaPets: `Moas`,
|
||||||
inventory_kubrowPets: `Bestias`,
|
inventory_kubrowPets: `Bestias`,
|
||||||
inventory_evolutionProgress: `Progreso de evolución Incarnon`,
|
inventory_evolutionProgress: `Progreso de evolución Incarnon`,
|
||||||
|
inventory_Boosters: `Potenciadores`,
|
||||||
inventory_bulkAddSuits: `Agregar Warframes faltantes`,
|
inventory_bulkAddSuits: `Agregar Warframes faltantes`,
|
||||||
inventory_bulkAddWeapons: `Agregar armas faltantes`,
|
inventory_bulkAddWeapons: `Agregar armas faltantes`,
|
||||||
inventory_bulkAddSpaceSuits: `Agregar Archwings faltantes`,
|
inventory_bulkAddSpaceSuits: `Agregar Archwings faltantes`,
|
||||||
@ -100,7 +101,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `Maximizar rango de todos los centinelas`,
|
inventory_bulkRankUpSentinels: `Maximizar rango de todos los centinelas`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `Maximizar rango de todas las armas de centinela`,
|
inventory_bulkRankUpSentinelWeapons: `Maximizar rango de todas las armas de centinela`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `Maximizar todo el progreso de evolución Incarnon`,
|
inventory_bulkRankUpEvolutionProgress: `Maximizar todo el progreso de evolución Incarnon`,
|
||||||
inventory_Boosters: `Potenciadores`,
|
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `Misiones`,
|
quests_list: `Misiones`,
|
||||||
quests_completeAll: `Completar todas las misiones`,
|
quests_completeAll: `Completar todas las misiones`,
|
||||||
|
@ -86,6 +86,7 @@ dict = {
|
|||||||
inventory_moaPets: `Moas`,
|
inventory_moaPets: `Moas`,
|
||||||
inventory_kubrowPets: `Bêtes`,
|
inventory_kubrowPets: `Bêtes`,
|
||||||
inventory_evolutionProgress: `Progrès de l'évolution Incarnon`,
|
inventory_evolutionProgress: `Progrès de l'évolution Incarnon`,
|
||||||
|
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
||||||
inventory_bulkAddSuits: `Ajouter les Warframes manquantes`,
|
inventory_bulkAddSuits: `Ajouter les Warframes manquantes`,
|
||||||
inventory_bulkAddWeapons: `Ajouter les armes manquantes`,
|
inventory_bulkAddWeapons: `Ajouter les armes manquantes`,
|
||||||
inventory_bulkAddSpaceSuits: `Ajouter les Archwings manquants`,
|
inventory_bulkAddSpaceSuits: `Ajouter les Archwings manquants`,
|
||||||
@ -100,7 +101,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `Toutes les Sentinelles au rang max`,
|
inventory_bulkRankUpSentinels: `Toutes les Sentinelles au rang max`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `Toutes les armes de Sentinelles au rang max`,
|
inventory_bulkRankUpSentinelWeapons: `Toutes les armes de Sentinelles au rang max`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `Toutes les évolutions Incarnon au rang max`,
|
inventory_bulkRankUpEvolutionProgress: `Toutes les évolutions Incarnon au rang max`,
|
||||||
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `Quêtes`,
|
quests_list: `Quêtes`,
|
||||||
quests_completeAll: `Compléter toutes les quêtes`,
|
quests_completeAll: `Compléter toutes les quêtes`,
|
||||||
|
@ -86,6 +86,7 @@ dict = {
|
|||||||
inventory_moaPets: `МОА`,
|
inventory_moaPets: `МОА`,
|
||||||
inventory_kubrowPets: `Звери`,
|
inventory_kubrowPets: `Звери`,
|
||||||
inventory_evolutionProgress: `Прогресс эволюции Инкарнонов`,
|
inventory_evolutionProgress: `Прогресс эволюции Инкарнонов`,
|
||||||
|
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
||||||
inventory_bulkAddSuits: `Добавить отсутствующие варфреймы`,
|
inventory_bulkAddSuits: `Добавить отсутствующие варфреймы`,
|
||||||
inventory_bulkAddWeapons: `Добавить отсутствующее оружие`,
|
inventory_bulkAddWeapons: `Добавить отсутствующее оружие`,
|
||||||
inventory_bulkAddSpaceSuits: `Добавить отсутствующие арчвинги`,
|
inventory_bulkAddSpaceSuits: `Добавить отсутствующие арчвинги`,
|
||||||
@ -100,7 +101,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `Максимальный ранг всех стражей`,
|
inventory_bulkRankUpSentinels: `Максимальный ранг всех стражей`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `Максимальный ранг всего оружия стражей`,
|
inventory_bulkRankUpSentinelWeapons: `Максимальный ранг всего оружия стражей`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `Максимальный ранг всех эволюций Инкарнонов`,
|
inventory_bulkRankUpEvolutionProgress: `Максимальный ранг всех эволюций Инкарнонов`,
|
||||||
inventory_Boosters: `[UNTRANSLATED] Boosters`,
|
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `Квесты`,
|
quests_list: `Квесты`,
|
||||||
quests_completeAll: `Завершить все квесты`,
|
quests_completeAll: `Завершить все квесты`,
|
||||||
|
@ -86,6 +86,7 @@ dict = {
|
|||||||
inventory_moaPets: `恐鸟`,
|
inventory_moaPets: `恐鸟`,
|
||||||
inventory_kubrowPets: `动物同伴`,
|
inventory_kubrowPets: `动物同伴`,
|
||||||
inventory_evolutionProgress: `灵化之源进度`,
|
inventory_evolutionProgress: `灵化之源进度`,
|
||||||
|
inventory_Boosters: `加成器`,
|
||||||
inventory_bulkAddSuits: `添加缺失战甲`,
|
inventory_bulkAddSuits: `添加缺失战甲`,
|
||||||
inventory_bulkAddWeapons: `添加缺失武器`,
|
inventory_bulkAddWeapons: `添加缺失武器`,
|
||||||
inventory_bulkAddSpaceSuits: `添加缺失Archwing`,
|
inventory_bulkAddSpaceSuits: `添加缺失Archwing`,
|
||||||
@ -100,7 +101,7 @@ dict = {
|
|||||||
inventory_bulkRankUpSentinels: `所有守护升满级`,
|
inventory_bulkRankUpSentinels: `所有守护升满级`,
|
||||||
inventory_bulkRankUpSentinelWeapons: `所有守护武器升满级`,
|
inventory_bulkRankUpSentinelWeapons: `所有守护武器升满级`,
|
||||||
inventory_bulkRankUpEvolutionProgress: `所有灵化之源最大等级`,
|
inventory_bulkRankUpEvolutionProgress: `所有灵化之源最大等级`,
|
||||||
inventory_Boosters: `加成器`,
|
inventory_maxPlexus: `[UNTRANSLATED] Max Rank Plexus`,
|
||||||
|
|
||||||
quests_list: `任务`,
|
quests_list: `任务`,
|
||||||
quests_completeAll: `完成所有任务`,
|
quests_completeAll: `完成所有任务`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user