Skip to content

Commit

Permalink
Update to support Episode: Heresy changes
Browse files Browse the repository at this point in the history
- Fix not being able to get manifest due to authorization header being provided
- Fix Final Shape watermark not being resolvable anymore
- Add Episode: Heresy moment
- Add 2 new Episode: Revenant wallpapers, and 4 new Episode: Heresy wallpapers
- Make a temporary workaround for collections issues caused by class type being broken
- Fix duplicate weapons in collections due to dedupe bug
- Move tonics to new Seasonal plug category
  • Loading branch information
ChiriVulpes committed Feb 5, 2025
1 parent f965c88 commit 82dd010
Show file tree
Hide file tree
Showing 14 changed files with 146 additions and 81 deletions.
4 changes: 0 additions & 4 deletions src/model/models/manifest/DestinyManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const elapsed = IManifest.elapsed;
const CacheComponentKey = IManifest.CacheComponentKey;

declare module "bungie-api-ts/destiny2" {
interface DestinyRecordDefinition {
recordTypeName?: string;
}

interface AllDestinyManifestComponents {
DestinyInventoryItemLiteDefinition: {
[key: number]: DestinyInventoryItemDefinition;
Expand Down
30 changes: 16 additions & 14 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"bungie-api-ts": "^5.1.0",
"deepsight.gg": "^1.0.814"
"bungie-api-ts": "^5.2.0",
"deepsight.gg": "^1.0.975"
}
}
14 changes: 13 additions & 1 deletion src/utility/endpoint/bungie/BungieEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class BungieEndpointImpl<ARGS extends any[], RESPONSE> extends Endpoint<RESPONSE
private allowedErrorStatuses: string[] = [];
private subdomain = "www";
private optionalAuth?: true;
private skipAuthHeaders?: true;
private profileSupplier?: (...args: ARGS) => IProfileStorage;

public constructor (path: BungieEndpointURLResolvable<ARGS>, builder?: (...args: ARGS) => EndpointRequest | Promise<EndpointRequest>) {
Expand All @@ -48,6 +49,14 @@ class BungieEndpointImpl<ARGS extends any[], RESPONSE> extends Endpoint<RESPONSE
return this;
}

public setSkipAuthHeaders (skipAuthHeaders = true) {
if (skipAuthHeaders)
this.skipAuthHeaders = skipAuthHeaders;
else
delete this.skipAuthHeaders;
return this;
}

public setProfile (supplier?: (...args: ARGS) => IProfileStorage) {
this.profileSupplier = supplier;
return this;
Expand Down Expand Up @@ -142,7 +151,9 @@ class BungieEndpointImpl<ARGS extends any[], RESPONSE> extends Endpoint<RESPONSE

protected override async getHeaders (headers?: Record<string, string | undefined>, ...args: ARGS) {
return {
"Authorization": headers?.Authorization ? undefined : await this.getAuthorisation(...args),
...this.skipAuthHeaders ? undefined : {
"Authorization": headers?.Authorization ? undefined : await this.getAuthorisation(...args),
},
"X-API-Key": Env.DEEPSIGHT_BUNGIE_API_KEY,
...headers,
};
Expand Down Expand Up @@ -172,6 +183,7 @@ interface BungieEndpoint<ARGS extends any[], RESPONSE> {
allowErrorStatus (status: string): this;
setSubdomain (subdomain: string): this;
setOptionalAuth (optionalAuth?: boolean): this;
setSkipAuthHeaders (skipAuthHeaders?: boolean): this;
setProfile (supplier?: (...args: ARGS) => IProfileStorage): this;
}

Expand Down
3 changes: 2 additions & 1 deletion src/utility/endpoint/bungie/endpoint/destiny2/GetManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import BungieEndpoint from "utility/endpoint/bungie/BungieEndpoint";
export default BungieEndpoint
.at("/Destiny2/Manifest/")
.returning<DestinyManifest>()
.setOptionalAuth();
.setOptionalAuth()
.setSkipAuthHeaders();
9 changes: 8 additions & 1 deletion static/manifest/DeepsightMomentDefinition.json5
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
description: "The Final Shape looms—a nightmarish calcification of reality into the Witness's twisted design. Embark on a perilous journey into the heart of the Traveler, rally the Vanguard, and end the War of Light and Darkness.",
icon: { DestinyTraitDefinition: 2878306895 }, // The Final Shape
},
iconWatermark: { DestinyInventoryItemDefinition: 1033072181 }, // The Call
iconWatermark: { DestinyInventoryItemDefinition: 1681583613 }, // Ergo Sum
expansion: true,
year: 7,
},
Expand All @@ -318,6 +318,13 @@
year: 7,
seasonHash: 2758726573,
},
"38": {
id: "heresy",
iconWatermark: { DestinyInventoryItemDefinition: 3725585710 }, // Lodestar
season: 26,
year: 7,
seasonHash: 2758726574,
},
"-1": {
id: "revelry",
displayProperties: {
Expand Down
10 changes: 10 additions & 0 deletions static/manifest/DeepsightWallpaperDefinition.json5
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,21 @@
"https://www.destinythegame.com/content/dam/destiny/revenant/JB_EP2_Fikrul_02_Websafe.jpg",
"https://images.contentstack.io/v3/assets/blte410e3b15535c144/blt61d1ceda9aad17ff/6710bd1b1c3e18151a6032ee/2024_Vespers_Host_Press_Kit_Wallpapers_LARGE_002.jpg",
"https://images.contentstack.io/v3/assets/blte410e3b15535c144/bltf93f5427c3e2518d/6710bd173e32261ceb0e3fe4/2024_Vespers_Host_Press_Kit_Wallpapers_LARGE_003.jpg",
"https://www.destinythegame.com/content/dam/destiny/revenant/TP_2024_Episode2_Act2_Warden_v01b.png",
"https://www.destinythegame.com/content/dam/destiny/revenant/TP_2024_EP2_Act3_ExoticMission_Fikral_Mirror_wGuardians_v02.jpg",
],
"37.1": [
"https://images.contentstack.io/v3/assets/blte410e3b15535c144/blt58891d15cb790e28/66f4a03076717279e0a2e3f4/Vespers_Host_Thumbnail_16x9_LOGO-ONLY_EN.jpg",
"https://images.contentstack.io/v3/assets/blte410e3b15535c144/blt1fffd2873985975d/6710bd175b9e6f8c56f49adb/2024_Vespers_Host_Press_Kit_Wallpapers_LARGE_001.jpg",
"https://www.destinythegame.com/content/dam/destiny/revenant/CB_2024_Episode_2_Onslaught_Widows_Court%20(6)_A_web.jpg",
"https://www.destinythegame.com/content/dam/destiny/revenant/EP2_Revenant_Slayer_Baron_Lineup_WJ_01_A_Websafe.jpg",
],
"38": [
"https://www.destinythegame.com/content/dam/destiny/heresy/Heresy_Act_1_Feature_1_1920x1080.jpg",
"https://www.destinythegame.com/content/dam/destiny/heresy/Ep3_Key_Art_FLAT_Gradient_16-9.jpg",
],
"38.1": [
"https://www.destinythegame.com/content/dam/destiny/heresy/Heresy_Act_1_Feature_2_1920x1080.jpg",
"https://www.destinythegame.com/content/dam/destiny/heresy/Heresy_Act_1_Feature_3_1920x1080.jpg",
]
}
27 changes: 21 additions & 6 deletions tasks/manifest/DeepsightCollectionsDefinition.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { InventoryItemHashes, type InventoryBucketHashes, type MomentHashes } from "@deepsight.gg/enums";
import type { DeepsightCollectionsDefinitionManifest } from "@deepsight.gg/interfaces";
import Arrays from "@deepsight.gg/utility/Arrays";
import type { PromiseOr } from "@deepsight.gg/utility/Type";
import ansi from "ansicolor";
import type { DestinyInventoryItemDefinition, DestinyPlugSetDefinition } from "bungie-api-ts/destiny2";
import { DestinyClass } from "bungie-api-ts/destiny2";
import fs from "fs-extra";
Expand Down Expand Up @@ -140,13 +142,23 @@ const IGNORED_ITEM_ISSUES = [
"Wing Theorem",
"Xenos Vale Bond",
"Xenos Vale IV",
// TODO remove these after the class type manifest issue is fixed
"Arms of Optimacy",
"Chest Armor",
"Gauntlets",
"Helmet",
"Kairos Function Boots",
"Leg Armor",
"Legs of Optimacy",
"Mindbreaker Boots",
"Refugee Boots",
"Refugee Gloves",
"Refugee Helm",
"Refugee Vest",
"Viperidax Helmet",
];

const ACCEPTIBLE_DUPLICATES = [
InventoryItemHashes.JurassicGreenPulseRifle2603335652,
InventoryItemHashes.JurassicGreenPulseRifle3103255595,
InventoryItemHashes.ZephyrSword396910433,
InventoryItemHashes.ZephyrSword1911078836,
const ACCEPTIBLE_DUPLICATES: InventoryItemHashes[] = [
];

const hasArtificeIntrinsic = (item: DestinyInventoryItemDefinition) =>
Expand Down Expand Up @@ -267,6 +279,7 @@ async function computeDeepsightCollectionsDefinition () {
buckets: {},
};
const bucket = buckets[itemB.inventory.bucketTypeHash as InventoryBucketHashes] ??= [];
Arrays.removeSwap(bucket, ...[...existing ?? []].map(i => i.hash));
bucket.push(itemB.hash);
}

Expand All @@ -277,7 +290,9 @@ async function computeDeepsightCollectionsDefinition () {
.map(issueItems => {
const item = issueItems[0];
const className = item.classType === DestinyClass.Hunter ? "Hunter" : item.classType === DestinyClass.Titan ? "Titan" : item.classType === DestinyClass.Warlock ? "Warlock" : "";
return ` - ${item.displayProperties.name} (${className ? `${className} ` : ""}${item.itemTypeDisplayName}): ${issueItems.map(item => item.hash).join(" ")}`;
return ` - ${item.displayProperties.name} (${className ? `${className} ` : ""}${item.itemTypeDisplayName}):\n${issueItems
.map(item => ansi.darkGray(` - https://data.destinysets.com/i/InventoryItem:${item.hash}`))
.join("\n")}`;
})
.sort()
.join("\n")}`);
Expand Down
20 changes: 12 additions & 8 deletions tasks/manifest/IDeepsightPlugCategorisation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export enum DeepsightPlugCategory {
Infusion,
Destination,
Information,
Tonic,
Seasonal,
}

export enum DeepsightPlugTypeIntrinsic {
Expand Down Expand Up @@ -176,13 +176,17 @@ export enum DeepsightPlugTypeDestination {
TravelersBlessingsPlaystyle,
}

export enum DeepsightPlugTypeTonic {
export enum DeepsightPlugTypeSeasonal {
None,
Placeholder,
Reagent,
Combat,
Loot,
Formula,
TonicPlaceholder,
TonicReagent,
TonicCombat,
TonicLoot,
TonicFormula,
ScrollTemporary,
ScrollPermanent,
ScrollRitual,
ArtifactBoost,
}

export const DeepsightPlugTypeMap = {
Expand All @@ -202,7 +206,7 @@ export const DeepsightPlugTypeMap = {
[DeepsightPlugCategory.Extractable]: /*%typeof*/ DeepsightPlugTypeExtractable,
[DeepsightPlugCategory.Destination]: /*%typeof*/ DeepsightPlugTypeDestination,
[DeepsightPlugCategory.Information]: null,
[DeepsightPlugCategory.Tonic]: /*%typeof*/ DeepsightPlugTypeTonic,
[DeepsightPlugCategory.Seasonal]: /*%typeof*/ DeepsightPlugTypeSeasonal,
};

export type DeepsightPlugType<CATEGORY extends DeepsightPlugCategory = DeepsightPlugCategory> =
Expand Down
2 changes: 1 addition & 1 deletion tasks/manifest/droptable/Prophecy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DeepsightDropTableDefinition } from "./DeepsightDropTableDefinitio

export default {
hash: ActivityHashes.Prophecy_ModifiersLength0,
rotationActivityHash: ActivityHashes.Prophecy_ModifiersLength4,
rotationActivityHash: ActivityHashes.Prophecy_ModifiersLength9,
displayProperties: {
icon: { DestinyRecordDefinition: RecordHashes.ProphecyComplete872886548 },
},
Expand Down
42 changes: 21 additions & 21 deletions tasks/manifest/droptable/VaultOfGlass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export default {
description: "Do not let the Vex reach the confluxes.",
},
dropTable: {
[InventoryItemHashes.VisionOfConfluenceScoutRifle]: {},
[InventoryItemHashes.FoundVerdictShotgun]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun]: {},
[InventoryItemHashes.VisionOfConfluenceScoutRifle_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.FoundVerdictShotgun_TooltipNotificationsLength3]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.KabrsBrazenGripsGauntletsPlug]: {},
[InventoryItemHashes.LightOfTheGreatPrismTitanMarkPlug]: {},
[InventoryItemHashes.PrimeZealotGlovesGauntletsPlug]: {},
Expand All @@ -55,9 +55,9 @@ export default {
description: "Silence the Oracles' song.",
},
dropTable: {
[InventoryItemHashes.PraedythsRevengeSniperRifle]: {},
[InventoryItemHashes.VisionOfConfluenceScoutRifle]: {},
[InventoryItemHashes.FoundVerdictShotgun]: {},
[InventoryItemHashes.PraedythsRevengeSniperRifle_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.VisionOfConfluenceScoutRifle_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.FoundVerdictShotgun_TooltipNotificationsLength3]: {},
[InventoryItemHashes.KabrsBrazenGripsGauntletsPlug]: {},
[InventoryItemHashes.KabrsForcefulGreavesLegArmorPlug]: {},
[InventoryItemHashes.PrimeZealotGlovesGauntletsPlug]: {},
Expand All @@ -74,9 +74,9 @@ export default {
description: "Defeat the Templar and its legions.",
},
dropTable: {
[InventoryItemHashes.FatebringerHandCannon]: {},
[InventoryItemHashes.VisionOfConfluenceScoutRifle]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun]: {},
[InventoryItemHashes.FatebringerHandCannon_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.VisionOfConfluenceScoutRifle_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.KabrsBrazenGripsGauntletsPlug]: {},
[InventoryItemHashes.KabrsWrathChestArmorPlug]: {},
[InventoryItemHashes.PrimeZealotGlovesGauntletsPlug]: {},
Expand Down Expand Up @@ -114,9 +114,9 @@ export default {
description: "Protect the timelines and awaken the Glass Throne.",
},
dropTable: {
[InventoryItemHashes.FatebringerHandCannon]: {},
[InventoryItemHashes.HezenVengeanceRocketLauncher]: {},
[InventoryItemHashes.FoundVerdictShotgun]: {},
[InventoryItemHashes.FatebringerHandCannon_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.HezenVengeanceRocketLauncher_TooltipNotificationsLength3]: {},
[InventoryItemHashes.FoundVerdictShotgun_TooltipNotificationsLength3]: {},
[InventoryItemHashes.KabrsBattlecageHelmetPlug]: {},
[InventoryItemHashes.KabrsForcefulGreavesLegArmorPlug]: {},
[InventoryItemHashes.PrimeZealotMaskHelmetPlug]: {},
Expand All @@ -133,9 +133,9 @@ export default {
description: "Destroy Atheon, Time's Conflux.",
},
dropTable: {
[InventoryItemHashes.PraedythsRevengeSniperRifle]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun]: {},
[InventoryItemHashes.HezenVengeanceRocketLauncher]: {},
[InventoryItemHashes.PraedythsRevengeSniperRifle_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.CorrectiveMeasureMachineGun_IconWatermarkShelvedUndefined]: {},
[InventoryItemHashes.HezenVengeanceRocketLauncher_TooltipNotificationsLength3]: {},
[InventoryItemHashes.VexMythoclastFusionRifle]: {},
[InventoryItemHashes.KabrsBattlecageHelmetPlug]: {},
[InventoryItemHashes.KabrsWrathChestArmorPlug]: {},
Expand All @@ -149,17 +149,17 @@ export default {
master: {
activityHash: ActivityHashes.VaultOfGlassMaster_ModifiersLength23,
dropTable: {
[InventoryItemHashes.FoundVerdictTimelostShotgun]: { purchaseOnly: true },
[InventoryItemHashes.FoundVerdictTimelostShotgun_IconWatermarkShelvedUndefined]: { purchaseOnly: true },
},
},
rotations: {
anchor: "2023-10-17T17:00:00Z",
masterDrops: [
InventoryItemHashes.FatebringerTimelostHandCannon,
InventoryItemHashes.HezenVengeanceTimelostRocketLauncher,
InventoryItemHashes.CorrectiveMeasureTimelostMachineGun,
InventoryItemHashes.VisionOfConfluenceTimelostScoutRifle,
InventoryItemHashes.PraedythsRevengeTimelostSniperRifle,
InventoryItemHashes.FatebringerTimelostHandCannon_IconWatermarkShelvedUndefined,
InventoryItemHashes.HezenVengeanceTimelostRocketLauncher_IconWatermarkShelvedUndefined,
InventoryItemHashes.CorrectiveMeasureTimelostMachineGun_TooltipNotificationsLength3,
InventoryItemHashes.VisionOfConfluenceTimelostScoutRifle_TooltipNotificationsLength3,
InventoryItemHashes.PraedythsRevengeTimelostSniperRifle_IconWatermarkShelvedUndefined,
],
challenges: [
ActivityModifierHashes.OutOfItsWay,
Expand Down
Loading

0 comments on commit 82dd010

Please sign in to comment.