Skip to content

Commit 5a0a029

Browse files
authored
Merge pull request #882 from DestinyItemManager/source-charity
Add charity source matched by iconWatermark
2 parents 8a0e0af + 2d44540 commit 5a0a029

4 files changed

Lines changed: 120 additions & 4 deletions

File tree

data/sources/category-config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ export const matchTable: {
4343
* in-game set-bonus text names its activity/source.
4444
*/
4545
equipableItemSetHashes?: number[];
46+
/**
47+
* iconWatermark filename(s) (or substrings) that belong to this sourceTag.
48+
* Any item whose iconWatermark contains one of these is included. Useful for
49+
* sources that share a distinctive watermark but no usable sourceString.
50+
*/
51+
iconWatermark?: string[];
4652
/**
4753
* the season this source was relagated into the DCV
4854
*/
@@ -1167,14 +1173,18 @@ export const matchTable: {
11671173
'Limited Edition',
11681174
'special offer',
11691175
'Deluxe Edition',
1170-
'charity',
11711176
'pre-order bonus',
11721177
'preorder',
11731178
'Refer-a-Friend',
11741179
'Handed out',
11751180
],
11761181
alias: ['limited'],
11771182
},
1183+
{
1184+
sourceName: 'charity',
1185+
desc: ['charity'],
1186+
iconWatermark: ['2b89827888c5581a14af976968bcb18a.png'],
1187+
},
11781188
{
11791189
sourceName: 'campaign',
11801190
desc: [

output/source-info-v2.ts

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,53 @@ const D2Sources: {
210210
],
211211
enteredDCV: 20,
212212
},
213+
charity: {
214+
itemHashes: [
215+
40494562, // Caped Cruiser
216+
171635528, // Hearts of Gold
217+
171635529, // Principled Porphyry
218+
171635530, // Argent Champion
219+
371705660, // Unconditional Love
220+
765122182, // Tenderhearted Shell
221+
826128643, // Small Luminance
222+
902219633, // Bridge of Magpies
223+
1047542010, // On Your Sleeve
224+
1047542011, // Heart Felt
225+
1059396448, // Tenth Muse
226+
1059396449, // Boundless
227+
1059396450, // Steadfast Column
228+
1059396451, // True Self
229+
1059396454, // Indivisible
230+
1061507881, // Altair Runner
231+
1165452712, // Cosmic Tune
232+
1257250409, // Seventh Sail
233+
1283654212, // Gilded Shell
234+
2068483326, // Phosphor Gladiator
235+
2268540161, // Warm Munificence
236+
2609270227, // Arena Shell
237+
2635366068, // Buoyant Shell
238+
2650448800, // Love Note Shell
239+
2650448801, // Heart's Oath Shell
240+
2704911691, // Lovestruck
241+
2749628923, // Disciple's Shell
242+
2764545753, // Empathic Shell
243+
2778157412, // Sweetheart Shell
244+
2811138603, // Altrux Pura Mk1
245+
3154194046, // Kilted Out
246+
3159276286, // Cosmic Arcade
247+
3229426560, // Laser Tag Brag
248+
3596008431, // Pale Blue Dot
249+
3919847952, // Circadian Guard
250+
4163975820, // Lubraean Luxury
251+
4182403848, // Prismatic Expanse
252+
4201060647, // Offset
253+
4222561358, // Light Hearted
254+
4253857367, // Heartful Shell
255+
],
256+
sourceHashes: [
257+
2985242208, // Source: Earned from a charity promotion.
258+
],
259+
},
213260
compass: {
214261
sourceHashes: [
215262
164083100, // Source: Display of Supremacy, Weekly Challenge
@@ -445,7 +492,6 @@ const D2Sources: {
445492
1743434737, // Source: Destiny 2 "Forsaken" preorder bonus gift.
446493
1866448829, // Source: Deluxe Edition Bonus
447494
2968206374, // Source: Earned as a Deluxe Edition bonus.
448-
2985242208, // Source: Earned from a charity promotion.
449495
3173463761, // Source: Pre-order Bonus
450496
3212282221, // Source: Forsaken Annual Pass
451497
3672287903, // Source: The Witch Queen Digital Deluxe Edition

output/source-info.ts

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,54 @@ const D2Sources: {
260260
],
261261
searchString: [],
262262
},
263+
charity: {
264+
itemHashes: [
265+
40494562, // Caped Cruiser
266+
171635528, // Hearts of Gold
267+
171635529, // Principled Porphyry
268+
171635530, // Argent Champion
269+
371705660, // Unconditional Love
270+
765122182, // Tenderhearted Shell
271+
826128643, // Small Luminance
272+
902219633, // Bridge of Magpies
273+
1047542010, // On Your Sleeve
274+
1047542011, // Heart Felt
275+
1059396448, // Tenth Muse
276+
1059396449, // Boundless
277+
1059396450, // Steadfast Column
278+
1059396451, // True Self
279+
1059396454, // Indivisible
280+
1061507881, // Altair Runner
281+
1165452712, // Cosmic Tune
282+
1257250409, // Seventh Sail
283+
1283654212, // Gilded Shell
284+
2068483326, // Phosphor Gladiator
285+
2268540161, // Warm Munificence
286+
2609270227, // Arena Shell
287+
2635366068, // Buoyant Shell
288+
2650448800, // Love Note Shell
289+
2650448801, // Heart's Oath Shell
290+
2704911691, // Lovestruck
291+
2749628923, // Disciple's Shell
292+
2764545753, // Empathic Shell
293+
2778157412, // Sweetheart Shell
294+
2811138603, // Altrux Pura Mk1
295+
3154194046, // Kilted Out
296+
3159276286, // Cosmic Arcade
297+
3229426560, // Laser Tag Brag
298+
3596008431, // Pale Blue Dot
299+
3919847952, // Circadian Guard
300+
4163975820, // Lubraean Luxury
301+
4182403848, // Prismatic Expanse
302+
4201060647, // Offset
303+
4222561358, // Light Hearted
304+
4253857367, // Heartful Shell
305+
],
306+
sourceHashes: [
307+
2985242208, // Source: Earned from a charity promotion.
308+
],
309+
searchString: [],
310+
},
263311
coil: {
264312
itemHashes: [],
265313
sourceHashes: [
@@ -772,7 +820,6 @@ const D2Sources: {
772820
1743434737, // Source: Destiny 2 "Forsaken" preorder bonus gift.
773821
1866448829, // Source: Deluxe Edition Bonus
774822
2968206374, // Source: Earned as a Deluxe Edition bonus.
775-
2985242208, // Source: Earned from a charity promotion.
776823
3173463761, // Source: Pre-order Bonus
777824
3212282221, // Source: Forsaken Annual Pass
778825
3672287903, // Source: The Witch Queen Digital Deluxe Edition
@@ -1590,7 +1637,6 @@ const D2Sources: {
15901637
1743434737, // Source: Destiny 2 "Forsaken" preorder bonus gift.
15911638
1866448829, // Source: Deluxe Edition Bonus
15921639
2968206374, // Source: Earned as a Deluxe Edition bonus.
1593-
2985242208, // Source: Earned from a charity promotion.
15941640
3173463761, // Source: Pre-order Bonus
15951641
3212282221, // Source: Forsaken Annual Pass
15961642
3672287903, // Source: The Witch Queen Digital Deluxe Edition

src/generate-source-info.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,20 @@ for (const [, matchRule] of Object.entries(matchTable)) {
236236
itemHashes.push(...dumpedSetItems);
237237
}
238238

239+
// include any items whose iconWatermark matches this sourceTag. Some sources
240+
// share a distinctive watermark but carry no usable sourceString.
241+
if (matchRule.iconWatermark) {
242+
const watermarkItems = allInventoryItems
243+
.filter(
244+
(i) =>
245+
!categoryDenyList.some((hash) => i.itemCategoryHashes?.includes(hash)) &&
246+
categoryIncludeList.some((hash) => i.itemCategoryHashes?.includes(hash)) &&
247+
matchRule.iconWatermark?.some((watermark) => i.iconWatermark?.includes(watermark)),
248+
)
249+
.map((i) => i.hash);
250+
itemHashes.push(...watermarkItems);
251+
}
252+
239253
// sort and uniq this after adding all elements
240254
itemHashes = uniqAndSortArray(itemHashes);
241255

0 commit comments

Comments
 (0)