@@ -921,6 +921,7 @@ function Map() {
921
921
}
922
922
}
923
923
924
+ console . log ( 'extracts' ) ;
924
925
//add extracts
925
926
if ( mapData . extracts . length > 0 ) {
926
927
const extractLayers = {
@@ -934,6 +935,7 @@ function Map() {
934
935
scav : 100 ,
935
936
} ;
936
937
for ( const extract of mapData . extracts ) {
938
+ const faction = extract . faction ?? 'shared' ;
937
939
if ( ! positionIsInBounds ( extract . position ) ) {
938
940
//continue;
939
941
}
@@ -942,16 +944,16 @@ function Map() {
942
944
pmc : '#00e599' ,
943
945
shared : '#00e4e5' ,
944
946
}
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' } ) ;
946
948
const extractIcon = L . divIcon ( {
947
949
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>` ,
949
951
iconAnchor : [ 12 , 12 ]
950
952
} ) ;
951
953
const extractMarker = L . marker ( pos ( extract . position ) , {
952
954
icon : extractIcon ,
953
955
title : extract . name ,
954
- zIndexOffset : zIndexOffsets [ extract . faction ] ,
956
+ zIndexOffset : zIndexOffsets [ faction ] ,
955
957
position : extract . position ,
956
958
top : extract . top ,
957
959
bottom : extract . bottom ,
@@ -981,7 +983,7 @@ function Map() {
981
983
extractMarker . bindPopup ( L . popup ( ) . setContent ( popup ) ) ;
982
984
}
983
985
extractMarker . on ( 'add' , checkMarkerForActiveLayers ) ;
984
- L . layerGroup ( [ rect , extractMarker ] ) . addTo ( extractLayers [ extract . faction ] ) ;
986
+ L . layerGroup ( [ rect , extractMarker ] ) . addTo ( extractLayers [ faction ] ) ;
985
987
986
988
checkMarkerBounds ( extract . position , markerBounds ) ;
987
989
}
@@ -1278,6 +1280,7 @@ function Map() {
1278
1280
if ( ! positionIsInBounds ( containerPosition . position ) ) {
1279
1281
continue ;
1280
1282
}
1283
+ console . log ( containerPosition . lootContainer . normalizedName ) ;
1281
1284
const containerIcon = L . icon ( {
1282
1285
iconUrl : `${ process . env . PUBLIC_URL } /maps/interactive/${ images [ `container_${ containerPosition . lootContainer . normalizedName } ` ] } .png` ,
1283
1286
iconSize : [ 24 , 24 ] ,
@@ -1432,8 +1435,6 @@ function Map() {
1432
1435
}
1433
1436
addLayer ( stationaryWeapons , 'stationarygun' , 'Usable' ) ;
1434
1437
}
1435
-
1436
- // add artillery zones
1437
1438
1438
1439
1439
1440
// Add static items
0 commit comments