Skip to content

Commit

Permalink
Merge pull request #252 from DestinyItemManager/unassigned-sources
Browse files Browse the repository at this point in the history
unassigned sources
  • Loading branch information
delphiactual committed Apr 21, 2021
2 parents af21a28 + 5de02c5 commit 7d03687
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
115 changes: 115 additions & 0 deletions output/unassigned-sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"13912404": "Source: Fully upgrade your Arc subclass.",
"32323943": "Source: Moments of Triumph.",
"100617404": "Requires Titan Class",
"151416041": "Source: Solstice of Heroes.",
"158391786": "Guide 10 encounters",
"210885364": "Source: Flawless completion of Presage Exotic Quest on Master difficulty.",
"287889699": "Source: Umbral Engram Tutorial",
"351235593": "Source: Eliminate Prison of Elders escapees found in strikes.",
"439994003": "Source: Complete the \"Master Smith\" Triumph.",
"508245276": "Source: Season of the Hunt",
"510530151": "Source: Dawning 2020",
"557146120": "Source: Complete a Guided Game as a guide or seeker.",
"569214265": "Source: Earned over the course of the Red War campaign.",
"594760007": "Source: \"Forging Your Own Path\" quest.",
"611838069": "Source: Earned during the seasonal Guardian Games event.",
"639650067": "Source: Limited Edition of Destiny 2.",
"641018908": "Source: Earned during the 2018 Solstice of Heroes event.",
"677167936": "Source: Complete the campaign as a Warlock.",
"736336644": "Source: \"A Spark of Hope\" quest.",
"772619302": "Completed all 8 Moments of Triumph in Destiny's second year.",
"798957490": "Source: Complete wanted escapee bounties for the Spider.",
"866530798": "Source: Not a Scratch.",
"887452441": "Source: Gambit Salvager's Salvo Armament",
"918840100": "Source: Complete the Shadowkeep campaign.",
"1051097308": "Guide 50 encounters",
"1076222895": "Source: Defeat bosses in Flashpoints.",
"1103518848": "Source: Earned over the course of the Warmind campaign.",
"1118966764": "Source: Dismantle an item with this shader applied to it.",
"1126234343": "Source: Witness Rasputin's Full Power",
"1281387702": "Source: Fully upgrade your Void subclass.",
"1286883820": "Source: Prismatic Recaster",
"1358645302": "Source: Unlocked by a special offer.",
"1360005982": "Completed a Moment of Triumph in Destiny's second year.",
"1373504223": "Acquired from completing a Season of Opulence Triumph.",
"1397119901": "Completed a Moment of Triumph in Destiny's first year.",
"1402439016": "",
"1412777465": "Source: Forsaken Refer-a-Friend",
"1462687159": "Reached level 5 in the Ages of Triumph record book.",
"1492981395": "Source: \"The Stasis Prototype\" quest.",
"1497107113": "Source: Seasonal Quest, \"Seraph Warsat Network\".",
"1563875874": "Source: Exotic engrams; extremely rare world drops.",
"1670837732": "Source: Found in Legendary world engrams.",
"1677921161": "Source: Festival of the Lost 2018.",
"1692165595": "Source: Rock Bottom.",
"1701477406": "Source: Flashpoint milestones; Legendary engrams.",
"1723452413": "Source: Season of Arrivals.",
"1743434737": "Source: Destiny 2 \"Forsaken\" preorder bonus gift.",
"1745960977": "Source: Pit of Heresy",
"1866448829": "Source: Deluxe Edition Bonus",
"1919933822": "Source: Festival of the Lost 2020.",
"1957611613": "Source: An Exotic quest or challenge.",
"2000002391": "Source: Found in Gambit engrams.",
"2011810450": "Source: Season 13 Guardian Games",
"2039343154": "Source: Contact public event.",
"2130345705": "Source: Unlocked by default.",
"2171520631": "Source: Lost Lament",
"2187511136": "Source: Earned during the seasonal Revelry event.",
"2203185162": "Source: Solo Legend and Master Lost Sectors",
"2206233229": "Source: Follow treasure maps.",
"2230358252": "Source: End-of-Season event.",
"2242939082": "Requires Hunter Class",
"2308290458": "Requires 1,000 Warlock Kills",
"2335095658": "Source: Strikes.",
"2353223954": "Source: Season of the Worthy.",
"2502262376": "Source: Earned during the seasonal Crimson Days event.",
"2607739079": "Source: A Matter of Time",
"2653840925": "Source: Challenger's Proving VII Quest",
"2744321951": "Source: Complete a heroic Public Event.",
"2745272818": "Source: Presage Exotic Quest",
"2843045413": "Source: Gambit",
"2856954949": "Source: \"Let Loose Thy Talons\" Exotic quest.",
"2892963218": "Source: Earned while leveling.",
"2895784523": "Source: Pledge to all factions on a single character.",
"2929562373": "Source: Fully upgrade your Solar subclass.",
"2968206374": "Source: Earned as a Deluxe Edition bonus.",
"2985242208": "Source: Earned from a charity promotion.",
"2986841134": "Source: Salvager's Salvo Armament Quest",
"2988465950": "Source: Planetary faction chests.",
"3083076965": "Source: Unlocked by default.",
"3099553329": "Source: Complete the campaign as a Titan.",
"3107094548": "Source: Coup de Grâce",
"3112857249": "Completed all 10 Moments of Triumph in Destiny's first year.",
"3126774631": "Requires 1,000 Hunter Kills",
"3190938946": "Source: Festival of the Lost 2019.",
"3212282221": "Source: Forsaken Annual Pass",
"3353456375": "Defeat 25 Final Bosses",
"3388021959": "Source: Earned during the Guardian Games event.",
"3389857033": "Complete weekly strike milestones during Season 2 to earn this ornament. It is unlocked to the Took Offense, Shelter in Place, and Xenos Vale IV chest armor.",
"3391325445": "Source: Battlegrounds",
"3404977524": "Source: Contribute to the Empyrean Restoration effort.",
"3431853656": "Achieved a Grimoire score of over 5000 in Destiny.",
"3492941398": "Source: Complete quest \"The Lie\"",
"3522070610": "Source: Gambit.",
"3532642391": "Source: Earned over the course of the Forsaken campaign.",
"3589340943": "Source: Altars of Sorrow",
"3597879858": "Source: Presage Exotic Quest",
"3693722471": "Source: Festival of the Lost 2020.",
"3704442923": "Source: Earned over the course of the Curse of Osiris campaign.",
"3724111213": "Source: Earned during the 2019 Solstice of Heroes event.",
"3736521079": "Reached level 1 in the Ages of Triumph record book.",
"3936473457": "Requires Warlock Class",
"3937492340": "Source: Complete Seraph bounties.",
"3952847349": "Source: The Dawning.",
"3985423665": "Guide 25 encounters",
"4046490681": "Source: Complete the \"Global Resonance\" Triumph.",
"4054646289": "Source: Earned during the seasonal Dawning event.",
"4069355515": "Source: Handed out at US events in 2019.",
"4079816474": "Source: War Table",
"4155903822": "Source: Obtained from Master Cryptarch Rahool.",
"4166998204": "Source: Earned as a pre-order bonus.",
"4267157320": "Source: ???????",
"4288102251": "Requires 1,000 Titan Kills",
"4290499613": "Source: Complete the campaign as a Hunter."
}
19 changes: 19 additions & 0 deletions src/generate-source-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const allPresentationNodes = getAll('DestinyPresentationNodeDefinition');
* since none exists
*/
const sourceStringsByHash: Record<number, string> = {};
const unassignedSourceStringsByHash: Record<number, string> = {};
const allSources: number[] = [];
const assignedSources: number[] = [];
let unassignedSources: number[] = [];

for (const collectible of allCollectibles) {
const hash = collectible.sourceHash;
Expand All @@ -55,6 +59,7 @@ for (const collectible of allCollectibles) {
if (hash) {
// Only add sources that have an existing hash (eg. no classified items)
sourceStringsByHash[hash] = sourceName;
allSources.push(hash);
}
}

Expand Down Expand Up @@ -85,6 +90,7 @@ for (const [sourceHash, sourceString] of categories.exceptions) {
for (const [sourceTag, matchRule] of Object.entries(categories.sources)) {
// string match this category's source descriptions
const sourceHashes = applySourceStringRules(sourcesInfo, matchRule);
assignedSources.push(...sourceHashes);

// worth noting if one of our rules has become defunct
if (!sourceHashes.length) {
Expand Down Expand Up @@ -154,6 +160,19 @@ const annotated = annotate(pretty, sourcesInfo);

writeFile('./output/source-info.ts', annotated);

unassignedSources = allSources.filter((x) => !assignedSources.includes(x));

unassignedSources.forEach((hash) => {
const source = allCollectibles.find((c) => c.sourceHash === hash);
const sourceName = source?.sourceString
? source.sourceString
: source?.displayProperties.description ?? '';

unassignedSourceStringsByHash[hash] = sourceName;
});

writeFile('./output/unassigned-sources.json', unassignedSourceStringsByHash);

/**
* checks for sourceStringRules matches among the haystack's values,
* and returns the keys of matched values.
Expand Down

0 comments on commit 7d03687

Please sign in to comment.