mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 23:03:51 -06:00
new layer list update strategy
This commit is contained in:
parent
be290fef92
commit
9fb426b263
@ -780,16 +780,18 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
}
|
||||
|
||||
async updateLayerList() {
|
||||
Layers.layers = [];
|
||||
// Layers.layers = [];
|
||||
|
||||
this.verbose(1, 'Pulling [All For One] layer list...');
|
||||
const response = await axios.get(
|
||||
'http://hub.afocommunity.com/api/layers.json'
|
||||
'http://hub.afocommunity.com/api/layers.json', [ 0 ]
|
||||
);
|
||||
|
||||
for (const layer of response.data.Maps) {
|
||||
Layers.layers.push(new Layer(layer));
|
||||
if (!Layers.layers.find((e) => e.layerid == layer.layerid)) Layers.layers.push(new Layer(layer));
|
||||
}
|
||||
|
||||
this.verbose(1, 'Layer list updated');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user