Skip to content

Commit 8558f47

Browse files
authored
Merge pull request #1028 from the-hideout/festive-airdrop-icon
Add festive airdrop icon
2 parents 650cec7 + 26c6293 commit 8558f47

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed
Loading

src/components/footer/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function Footer() {
6868
<p>
6969
{t('Additional data courtesy of')}{' '}
7070
<a href="https://www.sp-tarkov.com/" target="_blank" rel="noopener noreferrer">
71-
<span>SPT-AKI</span>
71+
<span>SPT</span>
7272
</a>
7373
</p>
7474
<h3>{t('Map Icons')}</h3>

src/features/quests/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,14 @@ export const selectQuestsWithActive = createSelector([selectQuests, selectTrader
101101
return {
102102
...quest,
103103
objectives: quest.objectives.map(obj => {
104+
if (!obj) {
105+
return false;
106+
}
104107
return {
105108
...obj,
106109
complete: settings[settings.gameMode].objectivesCompleted?.includes(obj.id) || false,
107110
};
108-
}),
111+
}).filter(Boolean),
109112
active: (() => {
110113
if (!settings[settings.gameMode].useTarkovTracker) {
111114
return true;

src/pages/map/index.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ function Map() {
921921
}
922922
}
923923

924+
console.log('extracts');
924925
//add extracts
925926
if (mapData.extracts.length > 0) {
926927
const extractLayers = {
@@ -934,6 +935,7 @@ function Map() {
934935
scav: 100,
935936
};
936937
for (const extract of mapData.extracts) {
938+
const faction = extract.faction ?? 'shared';
937939
if (!positionIsInBounds(extract.position)) {
938940
//continue;
939941
}
@@ -942,16 +944,16 @@ function Map() {
942944
pmc: '#00e599',
943945
shared: '#00e4e5',
944946
}
945-
const rect = L.polygon(outlineToPoly(extract.outline), {color: colorMap[extract.faction], weight: 1, className: 'not-shown'});
947+
const rect = L.polygon(outlineToPoly(extract.outline), {color: colorMap[faction], weight: 1, className: 'not-shown'});
946948
const extractIcon = L.divIcon({
947949
className: 'extract-icon',
948-
html: `<img src="${process.env.PUBLIC_URL}/maps/interactive/extract_${extract.faction}.png"/><span class="extract-name ${extract.faction}">${extract.name}</span>`,
950+
html: `<img src="${process.env.PUBLIC_URL}/maps/interactive/extract_${faction}.png"/><span class="extract-name ${faction}">${extract.name}</span>`,
949951
iconAnchor: [12, 12]
950952
});
951953
const extractMarker = L.marker(pos(extract.position), {
952954
icon: extractIcon,
953955
title: extract.name,
954-
zIndexOffset: zIndexOffsets[extract.faction],
956+
zIndexOffset: zIndexOffsets[faction],
955957
position: extract.position,
956958
top: extract.top,
957959
bottom: extract.bottom,
@@ -981,7 +983,7 @@ function Map() {
981983
extractMarker.bindPopup(L.popup().setContent(popup));
982984
}
983985
extractMarker.on('add', checkMarkerForActiveLayers);
984-
L.layerGroup([rect, extractMarker]).addTo(extractLayers[extract.faction]);
986+
L.layerGroup([rect, extractMarker]).addTo(extractLayers[faction]);
985987

986988
checkMarkerBounds(extract.position, markerBounds);
987989
}
@@ -1278,6 +1280,7 @@ function Map() {
12781280
if (!positionIsInBounds(containerPosition.position)) {
12791281
continue;
12801282
}
1283+
console.log(containerPosition.lootContainer.normalizedName);
12811284
const containerIcon = L.icon({
12821285
iconUrl: `${process.env.PUBLIC_URL}/maps/interactive/${images[`container_${containerPosition.lootContainer.normalizedName}`]}.png`,
12831286
iconSize: [24, 24],
@@ -1432,8 +1435,6 @@ function Map() {
14321435
}
14331436
addLayer(stationaryWeapons, 'stationarygun', 'Usable');
14341437
}
1435-
1436-
// add artillery zones
14371438

14381439

14391440
// Add static items

src/pages/map/map-images.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const images = {
77
'container_cash-register-tar2-2': 'container_cash-register',
88
'container_dead-civilian': 'container_dead-scav',
99
'container_dead-scav': 'container_dead-scav',
10+
'container_festive-airdrop-supply-crate': 'container_festive-airdrop-supply-crate',
1011
'container_pmc-body': 'container_dead-scav',
1112
'container_civilian-body': 'container_dead-scav',
1213
'container_drawer': 'container_drawer',

0 commit comments

Comments
 (0)