Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Jan 28, 2024
1 parent 4be0f12 commit 4e3ac7a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
13 changes: 12 additions & 1 deletion scripts/prepareItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,23 @@ export default async function prepareItems(): Promise<void> {
itemNameMap[item.id] = item;
}
}
const deletedItems = Object.values(previousItems)
const deletedItems: any[] = Object.values(previousItems)
.filter((i: any) => !(itemNameMap as any)[i.id])
.filter(notEmpty);

messages.push(`New Items: ${moidLink(newItems)}.`);
messages.push(`Deleted Items: ${moidLink(deletedItems)}.`);
const sql = `SELECT
${deletedItems
.map(
item => `COUNT(*) FILTER (WHERE bank->>'${item.id}' IS NOT NULL) AS people_with_item_${item.id},
SUM((bank->>'${item.id}')::int) AS sum_item_${item.id},`
)
.join('\n')}
FROM users;
`;
messages.push(`${sql}`);

messages.push(
`Major price changes NOT changed: ${majorPriceChanges
Expand Down
12 changes: 0 additions & 12 deletions src/data/items/item_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -224964,18 +224964,6 @@
"wiki_url": "https://oldschool.runescape.wiki/w/Mysterious_crushed_meat",
"price": 0
},
"22405": {
"id": 22405,
"name": "Vial of blood",
"members": true,
"cost": 100,
"weight": 0.02,
"release_date": "2018-05-24",
"examine": "A glass vial containing some blood. Yuck.",
"wiki_name": "Vial of blood (A Taste of Hope)",
"wiki_url": "https://oldschool.runescape.wiki/w/Vial_of_blood_(A_Taste_of_Hope)",
"price": 0
},
"22406": {
"id": 22406,
"name": "Unfinished blood potion",
Expand Down
3 changes: 2 additions & 1 deletion src/simulation/monsters/low/g-m/LavaDragon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export const LavaDragonTable = new LootTable()

/* Tertiary */
.tertiary(250, 'Clue scroll (elite)')
.tertiary(10_000, 'Draconic visage');
.tertiary(10_000, 'Draconic visage')
.tertiary(18, 'Ensouled dragon head');

export default new SimpleMonster({
id: 6593,
Expand Down
3 changes: 3 additions & 0 deletions src/structures/Items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export interface ItemCollection {
export const USELESS_ITEMS = [
617, 8890, 6964, 2513, 19_492, 11_071, 11_068, 21_284, 24_735, 21_913, 4703, 4561, 2425, 4692, 3741,

// Quest blood vial
22_405,

// Pharaoh's sceptres
9045, 9046, 9047, 9048, 9049, 9050, 9051, 13_074, 13_075, 13_076, 13_077, 13_078, 16_176, 21_445, 21_446, 26_948,
26_950, 26_945,
Expand Down
2 changes: 2 additions & 0 deletions test/Items.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ describe('Items', () => {
expect(coins.id).toBe(995);
expect(coins.price).toEqual(1);
expect(Items.get('Snowy knight')!.price).toEqual(0);

expect(Items.get('Vial of blood')!.id).toEqual(22_446);
},
60_000
);
Expand Down

0 comments on commit 4e3ac7a

Please sign in to comment.