debug logging

This commit is contained in:
Skillet 2023-04-20 23:08:00 -04:00
parent 28b98d5f5e
commit 0a970443cc

View File

@ -1115,20 +1115,34 @@ layer
rconLayers.shift();
for (const layer of response.data.Maps) {
this.verbose(1, 'pulled layer: ', layer.rawName);
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
this.verbose(1, 'layer not already found?: ', layer.rawName);
if(rconLayers.find((e) => e === layer.rawName)) {
this.verbose(1, 'layer was found in RCON response: ', layer.rawName);
const hellolayer = new Layer(layer);
Layers._layers.set(hellolayer.layerid, hellolayer);
}
} else {
this.verbose(1, 'layer was already pulled, checking for RCON: ', layer.rawName);
if (rconLayers.find((e) => e === layer.rawName)){
this.verbose(1, 'layer was found in RCON: ', layer.rawName);
} else {
this.verbose(1, 'WARNING: layer not found in RCON, removing layer: ', layer.rawName);
Layers._layers.delete(layer.rawName);
}
}
}
// this.verbose(1, 'RCON Layers', rconLayers.length, this.mapLayer(rconLayers[ 0 ]))
for (const layer of rconLayers) {
this.verbose(1, 'layer found in RCON: ', layer);
if (!Layers.layers.find((e) => e?.layerid === layer)) {
this.verbose(1, 'RCON layer was not found in fetched layers: ', layer);
const newLayer = this.mapLayer(layer);
if (!newLayer) continue;
this.verbose(1, 'RCON layer was converted to normal layer: ', newLayer.layerid);
if (Layers._layers && Layers._layers instanceof Map)
Layers._layers.set(newLayer.layerid, newLayer);
else