Skip to content

Commit

Permalink
Revert extra 'show removed/added items' code
Browse files Browse the repository at this point in the history
  • Loading branch information
themrrobert committed Mar 2, 2024
1 parent 6821bf5 commit c9f39ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
23 changes: 1 addition & 22 deletions scripts/prepare.ts
Original file line number Diff line number Diff line change
@@ -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();
4 changes: 1 addition & 3 deletions scripts/prepareItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const itemsToIgnorePrices = [

const keysToWarnIfRemovedOrAdded: (keyof Item)[] = ['equipable', 'equipment', 'weapon'];

export default async function prepareItems() {
export default async function prepareItems(): Promise<void> {
const messages: string[] = [];
const allItemsRaw: RawItemCollection = await fetch(
'https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json'
Expand Down Expand Up @@ -454,6 +454,4 @@ FROM users;
writeFileSync('./updates.txt', messages.join('\n'));

messages.push('Prepared items.');

return itemNameMap;
}
2 changes: 1 addition & 1 deletion src/structures/Items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];

Expand Down

0 comments on commit c9f39ee

Please sign in to comment.