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