mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-24 02:33:52 -06:00
fix: just another try to fix layer list update
This commit is contained in:
parent
83c2c2ed89
commit
bb84fbe523
@ -1042,8 +1042,9 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
|
|
||||||
const rconLayers = (await this.server.rcon.execute('ListLayers'))?.split('\n') || [];
|
const rconLayers = (await this.server.rcon.execute('ListLayers'))?.split('\n') || [];
|
||||||
rconLayers.shift();
|
rconLayers.shift();
|
||||||
|
console.log(rconLayers);
|
||||||
if (rconLayers.length > 0) Layers.layers = Layers.layers.filter((l) => l != null && rconLayers.includes(l.layerid))
|
if (rconLayers.length > 0) Layers.layers = Layers.layers.filter((l) => l != null && rconLayers.includes(l.layerid))
|
||||||
// this.verbose(1, 'RCON Layers', this.mapLayer(rconLayers[ 0 ]))
|
this.verbose(1, 'RCON Layers', rconLayers.length, this.mapLayer(rconLayers[ 0 ]))
|
||||||
if (sheetCsv.length > 0) {
|
if (sheetCsv.length > 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