Skip to content

Commit

Permalink
Move xmas/spooky dyed items to new dc cl
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Feb 22, 2024
1 parent de7239d commit 4cd4467
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/lib/data/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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']),
Expand Down
3 changes: 3 additions & 0 deletions src/lib/dyedItems.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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'),
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/snapshots/clsnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cd4467

Please sign in to comment.