Skip to content

Commit

Permalink
Merge pull request #508 from the-hideout/fix-streets-extract
Browse files Browse the repository at this point in the history
Remove duplicate streets extract
  • Loading branch information
Razzmatazzz authored Apr 15, 2024
2 parents 4214b8c + aac73a3 commit 075d4af
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions src/tarkov-data-manager/modules/tarkov-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,26 @@ const dataFunctions = {
};
const excludedExtracts = {
Shoreline: [
'exit_ALL_alpinist_shoreline'
{
name: 'exit_ALL_alpinist_shoreline',
}
],
TarkovStreets: [
'Exit_E1', // Old Stylobate Building Elevator
'Exit_E6', // Old Scav Checkpoint
'E6_new', // new Scav Checkpoint
{ // Old Stylobate Building Elevator
name: 'Exit_E1',
},
{ // Old Scav Checkpoint
name: 'Exit_E6',
},
{ // new Scav Checkpoint
name:'E6_new',
},
{ // old Crash Site
name: 'Exit_E4_new',
requirements: {
status: 'Pending',
}
}
]
};
const excludedZones = {
Expand All @@ -142,8 +156,21 @@ const dataFunctions = {
if (extract.location.size.x <= 1 && extract.location.size.y <= 1 && extract.location.size.z <= 1) {
return extracts;
}
if (excludedExtracts[map.Id]?.includes(extract.name)) {
return extracts;
const excludeTest = excludedExtracts[map.Id]?.find(e => e.name === extract.name);
if (excludeTest) {
if (!excludeTest.requirements) {
return extracts;
}
let matched = true;
for (const property in excludeTest.requirements) {
if (excludeTest.requirements[property] !== extract[property]) {
matched = false;
break;
}
}
if (matched) {
return extracts;
}
}
let duplicateExtract = extracts.find(e => {
if (e.settings.Name !== extract.settings.Name) {
Expand Down

0 comments on commit 075d4af

Please sign in to comment.