Skip to content

Commit de09a48

Browse files
committed
Indicate blueprint drops
1 parent b2b1d6d commit de09a48

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

index.php

+19-4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
fetch("https://browse.wf/warframe-public-export-plus/ExportRewards.json").then(res => res.json()),
5050
fetch("https://browse.wf/warframe-public-export-plus/ExportRegions.json").then(res => res.json()),
5151
fetch("https://browse.wf/warframe-public-export-plus/ExportEnemies.json").then(res => res.json()),
52+
fetch("https://browse.wf/warframe-public-export-plus/ExportRecipes.json").then(res => res.json()),
5253
fetch("https://browse.wf/warframe-public-export-plus/ExportTextIcons.json").then(res => res.json()),
5354
fetch("supplemental-data/glyphs.json").then(res => res.json())
5455
]).then(([
@@ -64,6 +65,7 @@
6465
ExportRewards,
6566
ExportRegions,
6667
ExportEnemies,
68+
ExportRecipes,
6769
ExportTextIcons,
6870
supplementalGlyphData
6971
]) =>
@@ -84,6 +86,11 @@
8486
window.ExportTextIcons = ExportTextIcons;
8587
window.supplementalGlyphData = supplementalGlyphData;
8688

89+
window.itemToRecipeMap = {};
90+
Object.entries(ExportRecipes).forEach(([uniqueName, recipe]) => {
91+
itemToRecipeMap[recipe.resultType] = uniqueName;
92+
});
93+
8794
updateMissionDeckNames();
8895

8996
if (document.getElementById("query").value)
@@ -486,7 +493,9 @@ function doQuery(query)
486493
|| result.type == "resource"
487494
)
488495
{
489-
const storeItem = "/Lotus/StoreItems/" + result.key.substring(7);
496+
const dropType = itemToRecipeMap[result.key] ?? result.key;
497+
const dropIsBlueprint = !!itemToRecipeMap[result.key];
498+
const storeItem = "/Lotus/StoreItems/" + dropType.substring(7);
490499
const sources = [];
491500
ExportRewards_entries.forEach(([deckName, tiers]) =>
492501
{
@@ -515,12 +524,13 @@ function doQuery(query)
515524
}
516525
}
517526
});
518-
Object.entries(ExportEnemies.droptables).forEach(([droptableName, pools]) => {
527+
Object.entries(ExportEnemies.droptables).forEach(([droptableName, pools]) =>
528+
{
519529
for (const pool of pools)
520530
{
521531
for (const reward of pool.items)
522532
{
523-
if (reward.type == result.key)
533+
if (reward.type == dropType)
524534
{
525535
sources.push({
526536
name: droptableNames[droptableName] ?? [droptableName],
@@ -563,7 +573,12 @@ function doQuery(query)
563573
{
564574
span.textContent += ", Rotation " + ("ABCD"[source.rotation]);
565575
}
566-
span.textContent += " gives " + source.itemCount + " @ " + (source.probability * 100).toFixed(2) + "%";
576+
span.textContent += " gives " + source.itemCount;
577+
if (dropIsBlueprint)
578+
{
579+
span.textContent += " blueprint";
580+
}
581+
span.textContent += " @ " + (source.probability * 100).toFixed(2) + "%";
567582
li.appendChild(span);
568583
}
569584
ul.appendChild(li);

0 commit comments

Comments
 (0)