From 7b557a31ad35e7558f0bdb847e487c33136a27e9 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 23 Mar 2024 10:59:08 +0000 Subject: [PATCH] Small formatting changes --- project/src/generators/RepeatableQuestGenerator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index c53ef80d..cef1b80d 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -3,7 +3,7 @@ import { inject, injectable } from "tsyringe"; import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; -import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IQuestCondition, IQuestConditionCounterCondition } from "@spt-aki/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; @@ -529,11 +529,13 @@ export class RepeatableQuestGenerator { const itemBlacklist = this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsBlacklist; + // we filter and concatenate the arrays according to current player level const itemIdsBlacklisted = itemBlacklist.filter((p) => p.minPlayerLevel <= pmcLevel).reduce( (a, p) => a.concat(p.itemIds), [], ); + itemSelection = itemSelection.filter((x) => { return itemIdsBlacklisted.every((v) => !this.itemHelper.isOfBaseclass(x[0], v))