|
74 | 74 | { |
75 | 75 | window.dict = dict; |
76 | 76 | window.dict_entries = Object.entries(window.dict).sort(([key1, value1], [key2, value2]) => value1.length - value2.length); |
| 77 | + window.ExportWarframes = ExportWarframes; |
| 78 | + window.ExportWeapons = ExportWeapons; |
| 79 | + window.ExportUpgrades = ExportUpgrades; |
| 80 | + window.ExportArcanes = ExportArcanes; |
| 81 | + window.ExportResources = ExportResources; |
| 82 | + window.ExportFlavour = ExportFlavour; |
| 83 | + window.ExportCustoms = ExportCustoms; |
| 84 | + window.ExportGear = ExportGear; |
| 85 | + window.ExportSentinels = ExportSentinels |
| 86 | + window.ExportRewards = ExportRewards; |
| 87 | + window.ExportRegions = ExportRegions; |
| 88 | + window.ExportEnemies = ExportEnemies; |
| 89 | + window.ExportTextIcons = ExportTextIcons; |
| 90 | + window.supplementalGlyphData = supplementalGlyphData; |
| 91 | + |
77 | 92 | window.ExportWarframes_entries = Object.entries(ExportWarframes); |
78 | 93 | window.ExportWeapons_entries = Object.entries(ExportWeapons); |
79 | 94 | window.ExportUpgrades_entries = Object.entries(ExportUpgrades); |
|
84 | 99 | window.ExportGear_entries = Object.entries(ExportGear); |
85 | 100 | window.ExportSentinels_entries = Object.entries(ExportSentinels) |
86 | 101 | window.ExportRewards_entries = Object.entries(ExportRewards); |
87 | | - window.ExportRegions = ExportRegions; |
88 | | - window.ExportEnemies = ExportEnemies; |
89 | | - window.ExportTextIcons = ExportTextIcons; |
90 | | - window.supplementalGlyphData = supplementalGlyphData; |
91 | 102 |
|
92 | 103 | window.itemToRecipeMap = {}; |
93 | 104 | Object.entries(ExportRecipes).forEach(([uniqueName, recipe]) => { |
@@ -191,6 +202,16 @@ function doQuery(query) |
191 | 202 | }); |
192 | 203 | console.timeEnd("Sort results"); |
193 | 204 |
|
| 205 | + console.time("Try for direct result"); |
| 206 | + { |
| 207 | + const direct_result = getResultFromUniqueName(query); |
| 208 | + if (direct_result) |
| 209 | + { |
| 210 | + results.unshift(direct_result); |
| 211 | + } |
| 212 | + } |
| 213 | + console.timeEnd("Try for direct result"); |
| 214 | + |
194 | 215 | const tags_shown = {}; |
195 | 216 | document.getElementById("results").textContent = results.length == 0 ? "Found 0 results." : ""; |
196 | 217 | results.forEach(result => |
@@ -679,6 +700,55 @@ function resolveTagsToUses(results) |
679 | 700 | } |
680 | 701 | return res; |
681 | 702 | } |
| 703 | + |
| 704 | + function getResultFromUniqueName(uniqueName) |
| 705 | + { |
| 706 | + let entry = ExportWarframes[uniqueName]; |
| 707 | + if (entry) |
| 708 | + { |
| 709 | + return { type: "warframe", key: uniqueName, value: entry }; |
| 710 | + } |
| 711 | + entry = ExportWeapons[uniqueName]; |
| 712 | + if (entry) |
| 713 | + { |
| 714 | + return { type: "weapon", key: uniqueName, value: entry }; |
| 715 | + } |
| 716 | + entry = ExportUpgrades[uniqueName]; |
| 717 | + if (entry) |
| 718 | + { |
| 719 | + return { type: "upgrade", key: uniqueName, value: entry }; |
| 720 | + } |
| 721 | + entry = ExportArcanes[uniqueName]; |
| 722 | + if (entry) |
| 723 | + { |
| 724 | + return { type: "arcane", key: uniqueName, value: entry }; |
| 725 | + } |
| 726 | + entry = ExportResources[uniqueName]; |
| 727 | + if (entry) |
| 728 | + { |
| 729 | + return { type: "resource", key: uniqueName, value: entry }; |
| 730 | + } |
| 731 | + entry = ExportFlavour[uniqueName]; |
| 732 | + if (entry) |
| 733 | + { |
| 734 | + return { type: "flavour", key: uniqueName, value: entry }; |
| 735 | + } |
| 736 | + entry = ExportCustoms[uniqueName]; |
| 737 | + if (entry) |
| 738 | + { |
| 739 | + return { type: "custom", key: uniqueName, value: entry }; |
| 740 | + } |
| 741 | + entry = ExportGear[uniqueName]; |
| 742 | + if (entry) |
| 743 | + { |
| 744 | + return { type: "gear", key: uniqueName, value: entry }; |
| 745 | + } |
| 746 | + entry = ExportSentinels[uniqueName]; |
| 747 | + if (entry) |
| 748 | + { |
| 749 | + return { type: "sentinel", key: uniqueName, value: entry }; |
| 750 | + } |
| 751 | + } |
682 | 752 | </script> |
683 | 753 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> |
684 | 754 | </body> |
|
0 commit comments