Reduced complexity of filtering inside findAndAddHideoutProductionIdToProfile()
This commit is contained in:
parent
7ab3935b4b
commit
c7811f69cf
@ -1050,15 +1050,9 @@ export class QuestHelper {
|
|||||||
|
|
||||||
// More/less than single match, above filtering wasn't strict enough
|
// More/less than single match, above filtering wasn't strict enough
|
||||||
if (matchingProductions.length !== 1) {
|
if (matchingProductions.length !== 1) {
|
||||||
// Multiple match were found, last ditch attempt to match by questid (value we add manually to production.json via `gen:productionquests` command)
|
// Multiple matches were found, last ditch attempt to match by questid (value we add manually to production.json via `gen:productionquests` command)
|
||||||
matchingProductions = craftingRecipes.filter(
|
matchingProductions = matchingProductions.filter((prod) =>
|
||||||
(prod) =>
|
prod.requirements.some((requirement) => requirement.questId === questDetails._id),
|
||||||
prod.areaType === desiredHideoutAreaType &&
|
|
||||||
prod.requirements.some((requirement) => requirement.questId === questDetails._id) &&
|
|
||||||
prod.requirements.some(
|
|
||||||
(requirement) => requirement.requiredLevel === craftUnlockReward.loyaltyLevel,
|
|
||||||
) &&
|
|
||||||
prod.endProduct === craftUnlockReward.items[0]._tpl,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (matchingProductions.length !== 1) {
|
if (matchingProductions.length !== 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user