Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove standalone powerbank loot points #610

Merged
merged 6 commits into from
Mar 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/tarkov-data-manager/jobs/update-maps.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ class UpdateMapsJob extends DataJob {
...(this.mapLoot[mapId].spawnpointsForced?.map(sp => this.processLootSpawnPointItems(sp)) ?? []),
];
this.mapLooseLoot[mapId] = this.mapLooseLoot[mapId].filter(sp => sp.template.Items.length > 0);
// remove standalone powerbank spawns
this.mapLooseLoot[mapId] = this.mapLooseLoot[mapId].filter(sp => {
if (sp.template.Items.length > 1) {
return true;
}
if (sp.template.Items[0]._tpl !== '5af0561e86f7745f5f3ad6ac') {
return true;
}
return false;
});
const nearPositions = (pos, positions) => {
const axes = ['x', 'y', 'z'];
positionLoop: for (const pos2 of positions) {
Expand Down Expand Up @@ -382,7 +392,7 @@ class UpdateMapsJob extends DataJob {
accessKeysMinPlayerLevel: map.MinPlayerLvlAccessKeys,
};
this.logger.log(`✔️ ${this.getTranslation(mapData.name)} ${id}`);
console.log(mapData.lootLoose.length);
//console.log(mapData.lootLoose.length);
mapData.normalizedName = this.normalizeName(this.getTranslation(mapData.name));

if (this.mapRotationData[id]) {
Expand Down
2 changes: 1 addition & 1 deletion src/tarkov-data-manager/modules/cloudflare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const cloudflare = {
account_id: accountId,
sql: query,
params,
}).then((res) => Array.isArray(res) ? res[0] : res);
}).then((res) => Array.isArray(res.result) ? res.result[0] : res.result);
/*const response = await fetch(`${BASE_URL}accounts/424ad63426a1ae47d559873f929eb9fc/d1/database/6b25079c-ab80-41ba-bbe8-ed0f2913f87e/query`, {
method: 'POST',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/tarkov-data-manager/modules/tarkov-spt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const sptLangs = {
}

const branches = [
'3.11.0-dev',
'3.11.x-dev',
'master',
];

Expand Down
2 changes: 1 addition & 1 deletion src/tarkov-data-manager/modules/websocket-server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const webSocketServer = {
}
const connectedJson = ['status'];
const fleaMarketJson = ['credits'];
const anySessionMode = ['status', 'achievements'];
const anySessionMode = ['status'];
let clients = connectedJson.includes(jsonName) ? webSocketServer.connectedScanners() : webSocketServer.launchedScanners();
if (!anySessionMode.includes(jsonName)) {
clients = clients.filter(c => c.settings.sessionMode === sessionMode);
Expand Down
14 changes: 7 additions & 7 deletions src/tarkov-data-manager/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/tarkov-data-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"body-parser": "^1.20.2",
"chalk": "^4.1.2",
"cheerio": "^1.0.0",
"cloudflare": "^4.1.0",
"cloudflare": "^4.2.0",
"compute-midmean": "^1.0.3",
"cookie-session": "^2.1.0",
"cron-validator": "^1.3.1",
Expand Down
Loading