mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 18:23:52 -06:00
fixes
This commit is contained in:
parent
3f43fe7967
commit
86176a2106
16
mapvote.js
16
mapvote.js
@ -1116,16 +1116,18 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
'http://hub.afocommunity.com/api/layers.json', [0, 1959152751]
|
'http://hub.afocommunity.com/api/layers.json', [0, 1959152751]
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const layer of response.data.Maps) {
|
|
||||||
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
|
|
||||||
const hellolayer = new Layer(layer);
|
|
||||||
Layers._layers.set(hellolayer.layerid, hellolayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const rconLayers = (await this.server.rcon.execute('ListLayers'))?.split('\n') || [];
|
const rconLayers = (await this.server.rcon.execute('ListLayers'))?.split('\n') || [];
|
||||||
rconLayers.shift();
|
rconLayers.shift();
|
||||||
|
|
||||||
|
for (const layer of response.data.Maps) {
|
||||||
|
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
|
||||||
|
if(rconLayers.find((e) => e.layer === layer.rawName)) {
|
||||||
|
const hellolayer = new Layer(layer);
|
||||||
|
Layers._layers.set(hellolayer.layerid, hellolayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// this.verbose(1, 'RCON Layers', rconLayers.length, this.mapLayer(rconLayers[ 0 ]))
|
// this.verbose(1, 'RCON Layers', rconLayers.length, this.mapLayer(rconLayers[ 0 ]))
|
||||||
for (const layer of rconLayers) {
|
for (const layer of rconLayers) {
|
||||||
if (!Layers.layers.find((e) => e?.layerid === layer)) {
|
if (!Layers.layers.find((e) => e?.layerid === layer)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user