From c9f39ee44b0fd7769a7b4424547a2ef07e06f216 Mon Sep 17 00:00:00 2001 From: themrrobert <10122432+themrrobert@users.noreply.github.com> Date: Sat, 2 Mar 2024 09:34:59 -0800 Subject: [PATCH] Revert extra 'show removed/added items' code --- scripts/prepare.ts | 23 +---------------------- scripts/prepareItems.ts | 4 +--- src/structures/Items.ts | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/scripts/prepare.ts b/scripts/prepare.ts index 29ff1d83c..81d4648e0 100644 --- a/scripts/prepare.ts +++ b/scripts/prepare.ts @@ -1,26 +1,5 @@ import minifyDist from './minifyDist'; import prepareItems from './prepareItems'; -// @ts-ignore asif -import _items from '../src/data/items/item_data.json'; minifyDist(); -const previousItems: string[] = []; -for (const key of Object.keys(_items)) { - previousItems.push(key); -} - -const newItems: string[] = []; -const deletedItems: string[] = []; -prepareItems().then(newItemMap => { - for (const key of Object.keys(newItemMap)) - { - if (!previousItems.includes(key)) { - newItems.push(key); - } - } - for (const key of previousItems) { - if (!newItemMap[key]) deletedItems.push(key); - } - console.log(`Deleted items: ${deletedItems}`); - console.log(`New items: ${newItems}`); -}); +prepareItems(); diff --git a/scripts/prepareItems.ts b/scripts/prepareItems.ts index 2faf658c8..966a0ee67 100644 --- a/scripts/prepareItems.ts +++ b/scripts/prepareItems.ts @@ -234,7 +234,7 @@ const itemsToIgnorePrices = [ const keysToWarnIfRemovedOrAdded: (keyof Item)[] = ['equipable', 'equipment', 'weapon']; -export default async function prepareItems() { +export default async function prepareItems(): Promise { const messages: string[] = []; const allItemsRaw: RawItemCollection = await fetch( 'https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json' @@ -454,6 +454,4 @@ FROM users; writeFileSync('./updates.txt', messages.join('\n')); messages.push('Prepared items.'); - - return itemNameMap; } diff --git a/src/structures/Items.ts b/src/structures/Items.ts index 1c9dbe2df..bf9733309 100644 --- a/src/structures/Items.ts +++ b/src/structures/Items.ts @@ -37,7 +37,7 @@ export const USELESS_ITEMS = [ // SOTE Quest Clues 23_814, 23_815, 23_816, 23_817, - // "New" Clue scroll base items with changed IDs. Removed for consistency. + // Duplicate or Individual clue-step items that currently don't match the filtering regex: 10_184, 12_027, ];