mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +01:00
Add overrideIndex
for plugins adding PlayNext data
This commit is contained in:
parent
1e9406a493
commit
6ecf5b0efb
@ -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
|
||||
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user