diff --git a/src/lib/data/Collections.ts b/src/lib/data/Collections.ts index c070f6f767..53e8a66f81 100644 --- a/src/lib/data/Collections.ts +++ b/src/lib/data/Collections.ts @@ -10,7 +10,7 @@ import { divinationEnergies, portents } from '../bso/divination'; import { ClueTier, ClueTiers } from '../clues/clueTiers'; import { CollectionLogType } from '../collectionLogTask'; import { PHOSANI_NIGHTMARE_ID, ZALCANO_ID } from '../constants'; -import { dyedItems } from '../dyedItems'; +import { discontinuedDyes, dyedItems } from '../dyedItems'; import { growablePetsCL } from '../growablePets'; import { inventionCL } from '../invention/inventions'; import { keyCrates } from '../keyCrates'; @@ -45,7 +45,7 @@ import smithables from '../skilling/skills/smithing/smithables'; import { SkillsEnum } from '../skilling/types'; import { MUserStats } from '../structures/MUserStats'; import type { ItemBank } from '../types'; -import { fetchStatsForCL, itemID, stringMatches } from '../util'; +import { fetchStatsForCL, stringMatches } from '../util'; import resolveItems from '../util/resolveItems'; import { shuffleRandom } from '../util/smallUtils'; import { @@ -1411,7 +1411,7 @@ export const allCollectionLogs: ICollection = { 'Dyed Items': { counts: false, items: dyedItems - .map(i => i.dyedVersions.filter(i => i.dye.id !== itemID('Christmas dye')).map(i => i.item.id)) + .map(i => i.dyedVersions.filter(i => !discontinuedDyes.includes(i.dye.id)).map(i => i.item.id)) .flat(2) }, 'Clothing Mystery Box': { @@ -1762,6 +1762,12 @@ export const allCollectionLogs: ICollection = { ]), counts: false }, + 'Dyed Items (Discontinued)': { + counts: false, + items: dyedItems + .map(i => i.dyedVersions.filter(i => discontinuedDyes.includes(i.dye.id)).map(i => i.item.id)) + .flat(2) + }, 'Miscelleanous (Discontinued)': { alias: ['discontinued misc'], items: resolveItems(['Golden cape shard', 'Golden cape', 'Golden shard', 'Golden partyhat']), diff --git a/src/lib/dyedItems.ts b/src/lib/dyedItems.ts index 94f8c162be..f95d25a8b9 100644 --- a/src/lib/dyedItems.ts +++ b/src/lib/dyedItems.ts @@ -1,6 +1,7 @@ import { Item } from 'oldschooljs/dist/meta/types'; import getOSItem from './util/getOSItem'; +import resolveItems from './util/resolveItems'; interface DyedItem { baseItem: Item; @@ -279,6 +280,8 @@ export const allDyes = [ 'Spooky dye' ].map(getOSItem); +export const discontinuedDyes = resolveItems(['Spooky dye', 'Christmas dye']); + export const dyedItems: DyedItem[] = [ { baseItem: getOSItem('Drygore rapier'), diff --git a/tests/unit/snapshots/clsnapshots.test.ts.snap b/tests/unit/snapshots/clsnapshots.test.ts.snap index fabeba2a88..a68420ce2c 100644 --- a/tests/unit/snapshots/clsnapshots.test.ts.snap +++ b/tests/unit/snapshots/clsnapshots.test.ts.snap @@ -55,7 +55,8 @@ Divination (43) Divine Dominion (16) Duke Sucellus (8) Dungeoneering (45) -Dyed Items (88) +Dyed Items (83) +Dyed Items (Discontinued) (18) Easter 2022 (3) Easter 2023 (13) Easy Treasure Trails (131)