Skip to content

Commit

Permalink
Include game internal IDs in items.json
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Feb 5, 2025
1 parent 2a0f255 commit 47e1ac5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion updater/update_items.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class ItemUpdater {
};
this.processedRecipes = {};
this.ingredientHashes = {};
this.ingredientIds = {};

await Promise.all([
this.fetchBaroData(),
Expand Down Expand Up @@ -156,6 +157,7 @@ class ItemUpdater {
if (type && !this.blacklist.includes(name)) {
const recipe = this.recipes[item.uniqueName];
const processedItem = {
id: item.uniqueName,
maxLvl: type === "MECH" ? 40 : item.maxLevelCap,
mr: item.masteryReq
};
Expand Down Expand Up @@ -229,6 +231,8 @@ class ItemUpdater {
ingredientName,
ingredientRawName
);
if (!this.ingredientIds[ingredientName])
this.ingredientIds[ingredientName] = ingredientRawName;

const relics =
this.relics[ingredientRawName] ||
Expand Down Expand Up @@ -478,7 +482,8 @@ class ItemUpdater {
schema_version: SCHEMA_VERSION,
items: updater.processedItems,
recipes: updater.processedRecipes,
ingredient_hashes: updater.ingredientHashes
ingredient_hashes: updater.ingredientHashes,
ingredient_ids: updater.ingredientIds
};
const difference = diff(existingData, data);
if (difference || process.env.FORCE_UPLOAD === "true") {
Expand Down

0 comments on commit 47e1ac5

Please sign in to comment.