diff --git a/project/assets/configs/quest.json b/project/assets/configs/quest.json index 30c3c9cb..a51fe3b7 100644 --- a/project/assets/configs/quest.json +++ b/project/assets/configs/quest.json @@ -980,7 +980,8 @@ "rewardBlacklist": ["627bce33f21bc425b06ab967", "59f32c3b86f77472a31742f0", "59f32bb586f774757e1e8442"], "rewardAmmoStackMinSize": 5, "freeChangesAvailable": 2, - "freeChanges": 2 + "freeChanges": 2, + "keepDailyQuestTypeOnReplacement": false }, { "id": "618035d38012292db3081bf0", diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index a1751b09..de10d1ed 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -513,6 +513,10 @@ export class RepeatableQuestController { (config) => config.name === repeatablesInProfile.name, ); + // If the configuration dictates to replace with the same quest type, adjust the available quest types + if (repeatableConfig?.keepDailyQuestTypeOnReplacement) { + repeatableConfig.types = [questToReplace.type]; + } // Generate meta-data for what type/levelrange of quests can be generated for player const allowedQuestTypes = this.generateQuestPool(repeatableConfig, pmcData.Info.Level); const newRepeatableQuest = this.attemptToGenerateRepeatableQuest(pmcData, allowedQuestTypes, repeatableConfig); diff --git a/project/src/models/spt/config/IQuestConfig.ts b/project/src/models/spt/config/IQuestConfig.ts index 4ca2d9dc..d119b420 100644 --- a/project/src/models/spt/config/IQuestConfig.ts +++ b/project/src/models/spt/config/IQuestConfig.ts @@ -55,6 +55,7 @@ export interface IRepeatableQuestConfig { rewardAmmoStackMinSize: number; freeChangesAvailable: number; freeChanges: number; + keepDailyQuestTypeOnReplacement: boolean; } export interface IRewardScaling {