Fix Activity Quest check. (#575)
This commit is contained in:
parent
002ab8f4f7
commit
0cafa9a082
1 changed files with 8 additions and 1 deletions
|
|
@ -923,6 +923,12 @@ function getQuestAcceptedButtonProps(quest: Quest, text: string, disabled: boole
|
|||
};
|
||||
}
|
||||
|
||||
function isIncompatibleActivity(quest: Quest): boolean {
|
||||
return !!Object.keys(quest.config.taskConfigV2?.tasks || {}).some(taskType => {
|
||||
return "ACHIEVEMENT_IN_ACTIVITY" === taskType;
|
||||
});
|
||||
}
|
||||
|
||||
export default definePlugin({
|
||||
name: "Questify",
|
||||
description: "Enhance your Quest experience with a suite of features, or disable them entirely if they're not your thing.",
|
||||
|
|
@ -949,6 +955,7 @@ export default definePlugin({
|
|||
processQuestForAutoComplete,
|
||||
getQuestAcceptedButtonProps,
|
||||
getQuestAcceptedButtonText,
|
||||
isIncompatibleActivity,
|
||||
getQuestPanelOverride,
|
||||
setLastFilterChoices,
|
||||
getLastFilterChoices,
|
||||
|
|
@ -1278,7 +1285,7 @@ export default definePlugin({
|
|||
// Start Play Game Quests.
|
||||
// Video Quests are handled in the next patch group.
|
||||
match: /(?<=onClick:async\(\)=>{)/,
|
||||
replace: "const startingAutoComplete=arguments[0].isVideoQuest?false:!$self.processQuestForAutoComplete(arguments[0].quest);"
|
||||
replace: "const startingAutoComplete=(arguments[0].isVideoQuest||$self.isIncompatibleActivity(arguments[0].quest))?false:!$self.processQuestForAutoComplete(arguments[0].quest);"
|
||||
},
|
||||
{
|
||||
// The "Resume (XX:XX)" text is changed to "Watching (XX:XX)" if the Quest is active.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue