Skip to content

Commit

Permalink
Merge pull request #677 from DestinyItemManager/fix-memento-names
Browse files Browse the repository at this point in the history
Don't allow spaces in memento names
  • Loading branch information
chainrez authored Nov 5, 2024
2 parents 4263c6f + ffc2e66 commit ffd295e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions output/crafting-mementos.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"games": [18179099, 1429874803, 3617209212],
"monolithic": [461727014, 1745945065, 3100848450],
"garden of salvation": [619391783, 1750913471, 2430770464],
"gardenofsalvation": [619391783, 1750913471, 2430770464],
"solstice": [1257952519, 3481131423, 4160988416],
"lost": [1261107326, 1971919313, 3686736741],
"nightfall": [1425794805, 3254175265, 4240221838],
"iron banner": [1483496162, 1950948038, 3977496457],
"ironbanner": [1483496162, 1950948038, 3977496457],
"trials": [2012491044, 3408716127, 3831031876],
"gambit": [2140049750, 3060237106, 3088135833],
"champion": [2519247511, 3346875528, 4049753919],
Expand Down
2 changes: 1 addition & 1 deletion src/generate-crafting-mementos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ for (const memento of inventoryItems.filter(
(i) => i.plug?.plugCategoryHash === PlugCategoryHashes.Mementos,
)) {
const match = memento.displayProperties.name.match(mementoRegex);
const sourceName = match ? match[1].toLowerCase() : 'other';
const sourceName = match ? match[1].toLowerCase().replace(/\s/g, '') : 'other';

(mementosBySource[sourceName] ??= []).push(memento.hash);
}
Expand Down

0 comments on commit ffd295e

Please sign in to comment.