diff --git a/components/menuData.ts b/components/menuData.ts index 5a7f07a3..07a9f7d5 100644 --- a/components/menuData.ts +++ b/components/menuData.ts @@ -21,8 +21,8 @@ import { contractCreationTutorialId, DEFAULT_MASTERY_MAXLEVEL, gameDifficulty, - isSuit, getMaxProfileLevel, + isSuit, PEACOCKVERSTRING, unlockOrderComparer, uuidRegex, @@ -1407,14 +1407,23 @@ menuDataRouter.get( ) if (pluginData) { - cats.push( - createPlayNextTile( + if (pluginData.overrideIndex !== undefined) { + cats[pluginData.overrideIndex] = createPlayNextTile( req.jwt.unique_name, pluginData.nextContractId, req.gameVersion, pluginData.campaignDetails, - ), - ) + ) + } else { + cats.push( + createPlayNextTile( + req.jwt.unique_name, + pluginData.nextContractId, + req.gameVersion, + pluginData.campaignDetails, + ), + ) + } } //#endregion diff --git a/components/types/types.ts b/components/types/types.ts index 24ced269..0b3d2447 100644 --- a/components/types/types.ts +++ b/components/types/types.ts @@ -1408,6 +1408,13 @@ export interface PlayNextGetCampaignsHookReturn { * An object containing the campaign's details. */ campaignDetails: PlayNextCampaignDetails + /** + * An array index for plugins to override play next tiles that Peacock + * internally added + * + * @since v6.3.0 + */ + overrideIndex?: number } export type SafehouseCategory = {